pcntl_sigwaitinfo
pcntl_sigwaitinfo
Waits for signals
**pcntl_sigwaitinfo** array $signals array $info
The function suspends execution of the
calling script until one of the signals given in
are delivered. If one of the signal is already pending (e.g. blocked by
),
will return immediately.
pcntl_sigwaitinfo``signals``pcntl_sigprocmask``pcntl_sigwaitinfo
signalsArray of signals to wait for.
info
The parameter is set to an array containing
information about the signal.
info
The following elements are set for all signals:
The following elements may be set for the signal:
`SIGCHLD`
The following elements may be set for the ,
, and
signals:
`SIGILL``SIGFPE``SIGSEGV``SIGBUS`
The following element may be set for the
signal:
`SIGPOLL`
Returns a signal number on success,return.falseforfailure.
Voorbeeld: example
<?php
echo "Blocking SIGHUP signal\n";
pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP));
echo "Sending SIGHUP to self\n";
posix_kill(posix_getpid(), SIGHUP);
echo "Waiting for signals\n";
$info = array();
pcntl_sigwaitinfo(array(SIGHUP), $info);
?>
pcntl_sigprocmask``pcntl_sigtimedwait