Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Mar 2001 17:39:16 -0600
From:      seebs@plethora.net (Peter Seebach)
To:        hackers@freebsd.org
Subject:   Re: atexit 
Message-ID:  <200103092339.f29NdG227303@guild.plethora.net>
In-Reply-To: Your message of "Fri, 09 Mar 2001 15:35:33 PST." <Pine.GSO.4.30.0103091531250.24402-100000@multivac.sdsc.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.GSO.4.30.0103091531250.24402-100000@multivac.sdsc.edu>, Matthe
w Luckie writes:
>I'm wondering under what conditions a function specified with atexit()
>won't get called on FreeBSD when a program terminates.

"abnormal" termination.

>I take it that the cleanup function won't be called if the program dumps
>core, or if it is terminated with a kill(1) - or might it?

It shouldn't, in general, or if someone calls _exit().  If the program dies
from a signal, that's "abnormal" termination.

Note that some signals can be caught, and a program which catches them may
choose to exit cleanly, and may thus hit its atexit() registered functions.

-s

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103092339.f29NdG227303>