[PATCH] Don't close or flush stdio streams on abort
Ondřej Bílka
neleai@seznam.cz
Thu May 23 19:22:00 GMT 2013
On Wed, May 08, 2013 at 11:31:05AM +0200, Andreas Schwab wrote:
> [BZ #15436]
> * stdlib/abort.c (abort): Don't call fflush and __fcloseall.
> ---
> NEWS | 4 ++++
> stdlib/abort.c | 29 +++++------------------------
> 2 files changed, 9 insertions(+), 24 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 95a4e4f..e9bffbe 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -38,6 +38,10 @@ Version 2.18
>
> * New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
> It is based on draft TS 18661 and currently enabled as a GNU extension.
> +
> +* The abort function no longer tries to flush or close any stdio streams.
> + Doing so would run into locking problems because abort is required to be
> + async-signal-safe, but fflush and fclose cannot be.
>
I am ok with this if you fill enhancement ticket to bugzilla for
flushing when not locked.
More information about the Libc-alpha
mailing list