This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug stdio/15436] Don't close or flush stdio streams on abort
- From: "zackw at panix dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 09 Oct 2015 18:04:09 +0000
- Subject: [Bug stdio/15436] Don't close or flush stdio streams on abort
- Auto-submitted: auto-generated
- References: <bug-15436-131 at http dot sourceware dot org/bugzilla/>
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.