[iostreams] file_descriptor doesn't retry on EINTR

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[iostreams] file_descriptor doesn't retry on EINTR

Boost - Users mailing list
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

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

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: [iostreams] file_descriptor doesn't retry on EINTR

Boost - Users mailing list
> 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/

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users