pcntl_sigwaitinfo(3) php man page | unix.com

Man Page: pcntl_sigwaitinfo

Operating Environment: php

Section: 3

PCNTL_SIGWAITINFO(3)							 1						      PCNTL_SIGWAITINFO(3)

pcntl_sigwaitinfo - Waits for signals

SYNOPSIS
int pcntl_sigwaitinfo (array $set, [array &$siginfo])
DESCRIPTION
The pcntl_sigwaitinfo(3) function suspends execution of the calling script until one of the signals given in $set are delivered. If one of the signal is already pending (e.g. blocked by pcntl_sigprocmask(3)), pcntl_sigwaitinfo(3) will return immediately.
PARAMETERS
o $set - Array of signals to wait for. o $siginfo - The $siginfo parameter is set to an array containing informations about the signal. The following elements are set for all sig- nals: osigno: Signal number oerrno: An error number ocode: Signal code The following elements may be set for the SIGCHLD signal: ostatus: Exit value or signal outime: User time consumed ostime: System time consumed opid: Sending process ID ouid: Real user ID of sending process The following elements may be set for the SIGILL, SIGFPE, SIGSEGV and SIGBUS signals: oaddr: Memory location which caused fault The following element may be set for the SIGPOLL signal: oband: Band event ofd: File descriptor number
RETURN VALUES
On success, pcntl_sigwaitinfo(3) returns a signal number.
EXAMPLES
Example #1 pcntl_sigwaitinfo(3) example <?php echo "Blocking SIGHUP signal "; pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP)); echo "Sending SIGHUP to self "; posix_kill(posix_getpid(), SIGHUP); echo "Waiting for signals "; $info = array(); pcntl_sigwaitinfo(array(SIGHUP), $info); ?>
SEE ALSO
pcntl_sigprocmask(3), pcntl_sigtimedwait(3). PHP Documentation Group PCNTL_SIGWAITINFO(3)
Related Man Pages
siginfo(3head) - sunos
sigwait(3) - osf1
sigtimedwait(3) - osf1
siginfo.h(3head) - minix
siginfo.h(3head) - suse
Similar Topics in the Unix Linux Community
Program received signal SIGSEGV, Segmentation fault.
Displaying Array Elements in Shell Scripts
Process signals as administration
SIGUP Exceptions during the execution
Case signal