This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] BZ# 18125: setcontext: Call exit, not _exit, after last linked context executes.
- From: Pedro Alves <palves at redhat dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, John David Anglin <dave dot anglin at bell dot net>, Marcus Shawcroft <marcus dot shawcroft at linaro dot org>, Chung-Lin Tang <chunglin_tang at mentor dot com>
- Date: Sat, 14 Mar 2015 14:49:35 +0000
- Subject: Re: [PATCH] BZ# 18125: setcontext: Call exit, not _exit, after last linked context executes.
- Authentication-results: sourceware.org; auth=none
- References: <55035374 dot 6060906 at redhat dot com> <550435E6 dot 5040105 at redhat dot com>
On 03/14/2015 01:21 PM, Pedro Alves wrote:
> OOC, and for my own education, why bother with writing a file in
> the exit handler, and then checking that in the script on success
> exit, instead of just printf("PASS: ...") directly in the test
> program's exit handler?
Oh sorry, "D'oh" moment... If setcontext calls _exit then the
atexit handler won't run, and then the process exits with
exit code 0 and we'd miss issuing FAIL...
> (I wondered that because I noticed that the exit handler
> will run in many of the FAIL cases too, though I realize
> that those exit with exit code != 0 and thus won't return
> in PASS from the script).