[Patches] getpath patch (repost)
Greg Stein
gstein@lyra.org
Tue, 23 May 2000 13:50:26 -0700 (PDT)
On Tue, 23 May 2000, Skip Montanaro wrote:
> >>>>> "M-A" == M -A Lemburg <mal@lemburg.com> writes:
>
> M-A> "Fred L. Drake" wrote:
> >>
> >> On Tue, 23 May 2000, M.-A. Lemburg wrote:
> >> > The fatal error produces the core dump... so its not all that bad
> >> > ;-)
> >>
> >> Sigh. Perhaps we need a non-coring Py_FatalErrorXXX()?
>
> M-A> Hmm, the core dump is caused by abort() -- I don't think we can
> M-A> change that behaviour since it is defined by the C lib and using
> M-A> exit() is not an option since that would cause atexit() hooks to be
> M-A> called.
>
> Can't you use the _exit() system call or is that a Unix-only thing?
> According to my Linux man page _exit is part of the defined APIs for SVr4,
> SVID, POSIX, X/OPEN and BSD 4.3. It also states:
>
> _exit does not call any functions registered with the ANSI C atexit
> function and does not flush standard I/O buffers. To do these things,
> use exit(3).
>
> so you might have to flush all open stdio buffers manually.
>
> Maybe call _exit()+stdio flushes where _exit() is available and abort()
> otherwise...
Um... how about a reset here: WHY do you want to avoid the atexit()
functions?
Cheers,
-g
--
Greg Stein, http://www.lyra.org/