[PATCH] BZ# 18125: setcontext: Call exit, not _exit, after last linked context executes.

Carlos O'Donell carlos@redhat.com
Mon Mar 16 20:27:00 GMT 2015


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.

Cheers,
Carlos.



More information about the Libc-alpha mailing list