signal.2 (2010 09)

s
signal(2) signal(2)
then test the variables. If they have not changed, call
sigpause() to wait for the signal.
Threads Considerations
The signal disposition (such as catch/ignore/default) established by
signal() is shared by all threads in
the process. Blocked signal masks are maintained by each thread.
The use of this function is unspecified in a multithreaded process.
For more information regarding signals and threads, refer to signal (5).
EXAMPLES
The following call to
signal() sets up a signal-catching function for the
SIGINT signal:
void myhandler();
(void) signal(SIGINT, myhandler);
WARNINGS
signal() should not be used in conjunction with the facilities described under bsdproc (3C), sigac-
tion (2), sigset (3C), or sigvector (2).
signal() does not detect an invalid value for action , and if it does not equal
SIG_DFL or SIG_IGN,
or point to a valid function address, subsequent receipt of the signal sig causes undefined results.
AUTHOR
signal() was developed by HP, AT&T, and the University of California, Berkeley.
SEE ALSO
kill(1), init(1M), exec(2), exit(2), kill(2), lseek(2), pause(2), sigaction(2), sigvector(2), wait(2), waitid(2),
abort(3C), setjmp(3C), signal(5).
STANDARDS CONFORMANCE
signal(): AES, SVID2, SVID3, XPG2, XPG3, XPG4, ANSI C
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010