[iostreams] file_descriptor doesn't retry on EINTR
Hi, I have found that the file_descriptor class in Boost.Iostreams does not retry on EINTR. The relevant code is in libs/iostreams/src/file_descriptor.cpp. A bug was raised for this 7 years ago: https://svn.boost.org/trac10/ticket/4913 https://svn.boost.org/trac10/ticket/4913 There is a patch attached to that bug that makes the file_descriptor_impl::read method retry on EINTR. If something like this were implemented then something similar should also be done to retry in the file_descriptor_impl::write method. I could have a go at submitting a PR to make both the read and write methods retry if interrupted. But before I do this, is there any other history I should be aware of, like a good reason why EINTR is not currently handled? Many thanks, David
I could have a go at submitting a PR to make both the read and write methods retry if interrupted. But before I do this, is there any other history I should be aware of, like a good reason why EINTR is not currently handled?
I suppose one might wish to cancel the i/o? What you really want is that when the i/o is occurring from within a STL iostreams use case, then and only then is EINTR ignored. Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/
participants (2)
-
David Roberts
-
Niall Douglas