This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/15436] Don't close or flush stdio streams on abort


https://sourceware.org/bugzilla/show_bug.cgi?id=15436

Zack Weinberg <zackw at panix dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zackw at panix dot com

--- Comment #1 from Zack Weinberg <zackw at panix dot com> ---
Since glibc has flushed all open files on abort() for a very long time, we
probably ought to try to preserve a best-effort flush.

It appears that "stage 1" of abort() calls _IO_flush_all_lockp(0), which
attempts to flush all open files *without* doing any locking.  (This strikes me
as unsafe in a different manner, but at least it probably can't deadlock.) 
However, "stage 4" calls __fcloseall(), which does do locking.  Maybe that
should be swapped out for another call to _IO_flush_all_lockp(0)?  Actually
*closing* the files seems unnecessary since the only things after stage 4 are
an escalating chain of attempts to terminate the process.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]