Boost logo

Boost Users :

Subject: [Boost-users] [iostreams] file_descriptor doesn't retry on EINTR
From: David Roberts (dave.roberts_at_[hidden])
Date: 2017-11-29 16:10:22


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



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net