HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
s
sigvector(2) sigvector(2)
(TO BE OBSOLETED)
Call sc_syscall value
read (slow devices) SYS_READ
readv (slow devices) SYS_READV
write (slow devices) SYS_WRITE
writev (slow devices) SYS_WRITEV
open (slow devices) SYS_OPEN
ioctl (slow requests) SYS_IOCTL
close (slow requests) SYS_CLOSE
wait SYS_WAIT
select SYS_SELECT
pause SYS_PAUSE
sigpause SYS_SIGPAUSE
semop SYS_SEMOP
msgsnd SYS_MSGSND
msgrcv SYS_MSGRCV
These system calls are not defined if the preprocessor macro
_XPG2 is defined when <signal.h>is
included. This is because the X/Open Portability Guide, Issue 2 specifies a different meaning for the sym-
bol
SYS_OPEN (see limits(5)).
After a fork() or vfork() system call, the child inherits all signals, the signal mask, and the reserved
signal stack space.
exec(2) resets all caught signals to the default action; ignored signals remain ignored, the signal mask
remains unchanged, and the reserved signal stack space is released.
The mask specified in vec is not allowed to block signals that cannot be ignored, as defined in signal(5).
This is enforced silently by the system.
If
sigvector() is called to catch SIGCLD in a process that currently has terminated (zombie) chil-
dren, a SIGCLD signal is delivered to the calling process immediately, or as soon as SIGCLD is unblocked
if it is currently blocked. Thus, in a process that spawns multiple children and catches
SIGCLD, it is some-
times advisable to reinstall the handler for
SIGCLD after each invocation in case there are multiple zom-
bies present. This is true even though the handling of the signal is not reset by the system, as with sig-
nal(2), because deaths of multiple processes while
SIGCLD is blocked in the handler result in delivery of
only a single signal. Note that the function must reinstall itself after it has called wait() or
wait3().
Otherwise the presence of the child that caused the original signal always causes another signal to be
delivered.
RETURN VALUE
Upon successful completion,
sigvector() returns 0; otherwise, it returns -1 and sets errno to indi-
cate the reason.
ERRORS
sigvector() fails and no new signal handler is installed if any of the following conditions are encoun-
tered:
[EFAULT] Either vec or ovec points to memory that is not a valid part of the process
address space. Reliable detection of this error is implementation dependent.
[EINVAL] sig is not a valid signal number.
[EINVAL] An attempt was made to ignore or supply a handler for a signal that cannot be
caught or ignored; see signal(5).
WARNINGS
Restarting a select(2) call can sometimes cause unexpected results. If the select() call has a timeout
specified, the timeout is restarted with the call, ignoring any portion that had elapsed prior to interruption
by the signal. Normally this simply extends the timeout and is not a problem. However, if a handler
repeatedly catches signals, and the timeout specified to select() is longer than the time between those
signals, restarting the select() call effectively renders the timeout infinite.
sigvector() should not be used in conjunction with the facilities described under sigset(3C).
Obsolescent Interfaces
sigvector() is to be obsoleted at a future date.
HP-UX 11i Version 2: December 2007 Update − 3 − Hewlett-Packard Company 437