This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]