Re: _Exit() and signal handlers
- From: rlb@xxxxxxxxxxxxxxxxxxxxxx (Richard Bos)
- Date: Tue, 26 Jun 2007 06:43:49 GMT
Spiros Bousbouras <spibou@xxxxxxxxx> wrote:
In 7.20.4.4 of n1124 we read:
The _Exit function causes normal
program termination to occur and
control to be returned to the host
environment. No functions registered
by the atexit function or signal handlers
registered by the signal function are called.
Why is there a mention of signal handlers ? I
mean exit() doesn't call signal handlers either
and you wouldn't expect any library function
to call signal handlers unless it is explicitly
mentioned that it does. So why is there a need
to specify in this case that it does *not* call
signal handlers ?
Even in ISO C, the program can be set to catch SIGABRT. Though this in
itself does not justify that sentence, the implementation is free to
implement other signals; for example, it might implement a SIGEXIT
similar to SIGABRT, but occuring on normal rather than abnormal
termination. In that case, exit() would trigger it, but _Exit() must
not.
Richard
.
- References:
- _Exit() and signal handlers
- From: Spiros Bousbouras
- _Exit() and signal handlers
- Prev by Date: Re: reply the answer
- Next by Date: about pointer
- Previous by thread: _Exit() and signal handlers
- Next by thread: about pointer
- Index(es):
Relevant Pages
|
|