Opened 12 years ago
Last modified 12 years ago
#4913 new Bugs
file_descriptor_impl::read doesn't handle EINTR
| Reported by: | Owned by: | Jonathan Turkanis | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | iostreams |
| Version: | Boost 1.39.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
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
Attachments (1)
Change History (2)
by , 12 years ago
| Attachment: | file_descriptor.patch added |
|---|
comment:1 by , 12 years ago
| Component: | None → iostreams |
|---|---|
| Owner: | set to |
Note:
See TracTickets
for help on using tickets.
