Closed ChangqingW closed 8 months ago
Ahh you beat me to it! Was just about to push the exact same commit!
Not sure why, because reuse of an ifstream after closing should be OK. Would be curious if RAII is getting overaggressive, possibly due to the use of a pointer..? or, potentially, the file.close being interrupted due to it being a temporary named pipe.
Yeah how that happened is totally beyond me, this reusing of it did not throw segfault error when both are actual files, did not throw when the second is a file from /dev/fd
, but throws when the first file is from /dev/fd
🤷
or, potentially, the file.close being interrupted due to it being a temporary named pipe.
Probably! Because it throws when and only when the first file is a temporary named pipe
Yep. Don't really know C++ well enough to comment on how file.close works! I'm happy to merge this if you are?
Ah, just checked. After closing, file.fail()
is set to 1. So yes, it's a temporary file closing issue.
fix #26