473,480 Members | 1,918 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

_Exit() and signal handlers

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 ?

Jun 26 '07 #1
1 3006
Spiros Bousbouras <sp****@gmail.comwrote:
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
Jun 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2849
by: Michael Pronath | last post by:
Hi, can I make sure that Python uses only async-signal safe glibc functions in signal handlers? For example, you must not call malloc or free in signal handlers, see...
0
3334
by: steffen staehle | last post by:
Hi, I'm writing a server process which spawns child processes via fork This server process should keep track of the number of children stil running, do the necessary cleanup to avoid zombies,...
1
4738
by: Ahmed Ossman | last post by:
Hi Group, I have a serious question here, I got the following error after a two warnig as following: /opt/SUNWspro/bin/CC -Dsun -Dsparc -D_SYSTYPE_SYSV -DSYSTYPE_SYSV -DMK_VENDO R_CC -xO4...
2
2183
by: lpw | last post by:
I have dilligently reviewed FAQ-lite Section 3.2, "How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc." The only...
11
2922
by: Jackie | last post by:
Hi everyone, I'd like to know when and how signals are used (e.g. SIGFPE, SIGABRT, SIGTERM, SIGSEGV, SIGINT)? Thank you so much.
7
1688
by: Amit Sharma | last post by:
Hi, I want to write a program, where until we give the value of j as non zero, it should go on asking us values of i and j, displaying the message "Division by zero: Floating point exception" for...
7
1400
by: Free Bird | last post by:
Hello all, I have two questions about signal handlers. First of all, is it possible to specify a signal handler for all non-specified signals? Since ISO C defines only six signals but POSIX...
13
17603
by: vashwath | last post by:
Hi all, In my current project I am using signals for error handling. Since I cannot show full code, I have just shown important piece of code which is relevant. void sigsegenv() {...
5
6624
by: david | last post by:
I'm developing a program that runs using an asyncore loop. Right now I can adequately terminate it using Control-C, but as things get refined I need a better way to stop it. I've developed...
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4787
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4488
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.