This is the mail archive of the
mailing list for the glibc project.
Re: [RFC PATCH v4 3/5] support record failure: flush stdout, use _exit ()
- From: Florian Weimer <fweimer at redhat dot com>
- To: Mathieu Desnoyers <mathieu dot desnoyers at efficios dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, libc-alpha at sourceware dot org
- Date: Wed, 21 Nov 2018 19:50:16 +0100
- Subject: Re: [RFC PATCH v4 3/5] support record failure: flush stdout, use _exit ()
- References: <firstname.lastname@example.org> <email@example.com>
* Mathieu Desnoyers:
> Using "exit ()" from pthread_atfork handlers hangs the process. It is
> therefore not a good way to exit when reporting a testing error.
> Use _exit () instead, which directly exits the process. However,
> considering that the buffered stdout is used to output test failure
> messages, we first need to flush stdout before exiting.
This is not correct; we need the atexit handlers for cleaning up
It should be possible to call support_record_failure and rely on the
shared memory segment to register the test failure, so that it is
eventually reflected in the exit state (even if the failure happens in