[Boost-bugs] [Boost C++ Libraries] #4913: file_descriptor_impl::read doesn't handle EINTR

Subject: [Boost-bugs] [Boost C++ Libraries] #4913: file_descriptor_impl::read doesn't handle EINTR
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-30 16:11:53


#4913: file_descriptor_impl::read doesn't handle EINTR
---------------------------------------------------+------------------------
 Reporter: Todor Buyukliev <todor@…> | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: |
---------------------------------------------------+------------------------
 when using
 boost::iostreams::stream_buffer<boost::iostreams::file_descriptor_source>,
 reads from the stream may unnecessarily set the badbit flag. the reason is
 that in the underlying call to read() the EINTR condition is not handled.
 the read() should be restarted in this case.

 i'm attaching a non tested patch. it does the same thing that libstdc++
 does (function __basic_file<char>::xsgetn).

 this is easy to reproduce in gdb. here's why:
 http://sourceware.org/gdb/onlinedocs/gdb/Interrupted-System-Calls.html

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4913>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC