This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART
- From: "zlynx at acm dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Mar 2008 03:43:03 -0000
- Subject: [Bug libstdc++/35763] std::cout loses whole blocks of output if interrupted by signal without SA_RESTART
- References: <bug-35763-10271@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from zlynx at acm dot org 2008-03-30 03:43 -------
Forgot to mention, I filed a bug for fwrite too:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=5998
Until they fix that (if they do) it will be useless to check fwrite's return
value since you can't know how many bytes were written.
I think the fix would be to use write directly or to use the file operations
(which do seem to use write directly and check for EINTR returns) on fd 0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763