I noticed this when running a program that uses a periodic timer signal. The sigaction did not set SA_RESTART. During program runs, huge chunks of console output would disappear.
I sort of tracked this down to the code in libstdc++ that uses fwrite to do the output of cout and cerr. That is a bit weird, I expected it to be using the basic_file operations on fd 0 instead. In summary, it appears to call fwrite and never check the error return, then it increments the streambuf pointers and loses that whole output block. -- Summary: std::cout loses whole blocks of output if interrupted by signal without SA_RESTART Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zlynx at acm dot org GCC host triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35763