Bug#429021: libc6: fputs can lose data in buffer on signal

2007-06-18 Thread Dmitry Potapov
On Fri, Jun 15, 2007 at 06:47:55PM +0200, Pierre Habouzit wrote: > Nothing in POSIX says what happens wrt to fwrite and signals. At least > it's very unclear. But indeed the fact that SA_RESTART is the default > value for linux does not seem to be a POSIX requirement either. I have studied the s

Bug#429021: libc6: fputs can lose data in buffer on signal

2007-06-15 Thread Pierre Habouzit
reopen 429021 thanks On Fri, Jun 15, 2007 at 12:33:40PM -0400, Daniel Jacobowitz wrote: > On Fri, Jun 15, 2007 at 06:09:42PM +0200, Pierre Habouzit wrote: > > The bug is here, you should set the flags to SA_RESTART so that > > interupted syscalls are restarted. If you don't do so you'll break th

Bug#429021: libc6: fputs can lose data in buffer on signal

2007-06-15 Thread Daniel Jacobowitz
On Fri, Jun 15, 2007 at 06:09:42PM +0200, Pierre Habouzit wrote: > The bug is here, you should set the flags to SA_RESTART so that > interupted syscalls are restarted. If you don't do so you'll break the > libio. Is this documented anywhere? The manual says that EINTR is treated as an ordinary

Bug#429021: libc6: fputs can lose data in buffer on signal

2007-06-15 Thread Dmitry Potapov
Package: libc6 Version: 2.3.6.ds1-13 Severity: important fputs (and probably other FILE based output functions) can lose previously written data that were accumulated in the user space buffer when a signal arrives. Here is an example that demonstrates the problem: # cat t.c /