DavidsonGroup / flexiplex

The Flexible Demultiplexer
https://davidsongroup.github.io/flexiplex/
MIT License
23 stars 2 forks source link

rename file to reads_ifs #27

Closed ChangqingW closed 8 months ago

ChangqingW commented 8 months ago

fix #26

olliecheng commented 8 months ago

Ahh you beat me to it! Was just about to push the exact same commit!

olliecheng commented 8 months ago

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.

ChangqingW commented 8 months ago

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

olliecheng commented 8 months ago

Yep. Don't really know C++ well enough to comment on how file.close works! I'm happy to merge this if you are?

olliecheng commented 8 months ago

Ah, just checked. After closing, file.fail() is set to 1. So yes, it's a temporary file closing issue.