HP-UX Reference (11i v2 03/08) - 5 Miscellaneous Topics, 7 Device (Special) Files, 9 General Information, Index (vol 9)

s
signal(5) signal(5)
process, the process is continued, even if the
SIGCONT signal is blocked or ignored. If SIGCONT is
blocked and not ignored, the process remains pending until it is either unblocked or a stop signal is gen-
erated.
Note: When any stop signal (SIGSTOP, SIGTSTP, SIGTIN, SIGTTOU) is posted to threads created with
process contention scope, using
pthread_kill()
, pending SIGCONT signals may not be discarded.
Similarly, when SIGCONT is posted to threads created with process contention scope, using
pthread_kill()
, pending stop signals may not be discarded. However, stop and continue signals
posted to threads created with system contention scope, using
pthread_kill(), will continue to
adhere to the semantics described in the preceding paragraph.
SIGKILL is sent by the system if an
exec() system call is unsuccessful and the original program has
already been deleted.
WARNINGS
The signals
SIGCLD and SIGPWR behave differently than those described above.
The actions for these signals is modified as follows:
SIGCLD Setting the action for SIGCLD to
SIG_IGN in a parent process prevents exiting
children of the calling process from creating a zombie process. If the parent process
executes the
wait() function, the calling process blocks until all of the child
processes of the calling processes terminate. The wait() function then returns a
value of 1 with errno set to ECHILD (see wait(2)).
If one of the signal interface routines is used to set the action for
SIGCLD to be
caught (that is, a function address is supplied) in a process that currently has ter-
minated (zombie) children, a SIGCLD signal is delivered to the parent process
immediately. Thus, if the signal-catching function reinstalls itself, the apparent
effect is that any SIGCLD signals received due to the death of children while the
function is executing are queued and the signal-catching function is continually
reentered until the queue is empty. Note that the function must reinstall itself
after it calls wait(), wait3(),orwaitpid(). Otherwise the presence of the
child that caused the original signal causes another signal immediately, resulting in
infinite recursion.
Job control shells including C shell, Korn shell and the
POSIX shell (see csh(1),
ksh(1), and sh-posix (1)) make the shell itself the parent of all processes in the pipe-
line. Therefore, a process that can receive data from a pipe should not attempt to
catch SIGCLD.
SIGPWR The SIGPWR signal is sent to all processes after a power interruption when power is
restored and the system has done all necessary reinitialization. Processes restart by
catching (or ignoring) SIGPWR.
Applications that wish to recover from power failures should catch
SIGPWR and
take whatever necessary steps to reinitialize itself.
Some implementations do not generate
SIGPWR. Only systems with nonvolatile
memory can recover from power failures.
DEPENDENCIES
Series 700
The signal
SIGPWR is not currently generated.
Series 700/800
The structure pointer scp is always defined.
The code word is always zero for all signals except SIGILL and SIGFPE.ForSIGILL, code has the fol-
lowing values:
8 Illegal instruction trap;
9 Break instruction trap;
10 Privileged operation trap;
11 Privileged register trap.
HP-UX 11i Version 2: August 2003 3 Hewlett-Packard Company Section 5283