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: "Carlos O'Donell" <carlos at redhat dot com>
- To: Pedro Alves <palves 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: Mon, 16 Mar 2015 16:27:45 -0400
- 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> <55044A7F dot 2040703 at redhat dot com>
On 03/14/2015 10:49 AM, Pedro Alves wrote:
> 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...
That is correct.