[uClibc]abort + cleanup
Erik Andersen
andersen at lineo.com
Sat Jul 7 04:48:47 UTC 2001
On Tue Jul 03, 2001 at 05:15:58PM -0700, Steve Thayer wrote:
> I need to add on_exit support to uClibc, so I've been poking around in the
> exit, cleanup, and abort code. Right now, abort calls cleanup, and cleanup
> executes all the functions registered using atexit. This behavior is a
> little different than that of glibc, which only cleans up stdio... it does
> not execute any of the atexit or on_exit functions unless exit is explicitly
> called. So, my question is, SHOULD abort be calling those functions? If it
> should, what value would make sense to pass to the on_exit functions for the
> exit status? Does an exit status even make sense during an abort?
According to SuS2
http://www.opengroup.org/onlinepubs/007908799/xsh/abort.html
"The abnormal termination processing includes at least the effect of
fclose() on all open streams, and message catalogue descriptors, and the
default actions defined for SIGABRT."
It doesn't mention atexit stuff, so I think uClibc's current behavior
is not correct.
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list