[PATCH] BZ# 18125: setcontext: Call exit, not _exit, after last linked context executes.
Pedro Alves
palves@redhat.com
Sat Mar 14 14:49:00 GMT 2015
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).
Thanks,
Pedro Alves
More information about the Libc-alpha
mailing list