Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pcntl_sigtimedwait(3) [php man page]

PCNTL_SIGTIMEDWAIT(3)							 1						     PCNTL_SIGTIMEDWAIT(3)

pcntl_sigtimedwait - Waits for signals, with a timeout

SYNOPSIS
int pcntl_sigtimedwait (array $set, [array &$siginfo], [int $seconds], [int $nanoseconds]) DESCRIPTION
The pcntl_sigtimedwait(3) function operates in exactly the same way as pcntl_sigwaitinfo(3) except that it takes two additional parame- ters, $seconds and $nanoseconds, which enable an upper bound to be placed on the time for which the script is suspended. PARAMETERS
o $set - Array of signals to wait for. o $siginfo - The $siginfo is set to an array containing informations about the signal. See pcntl_sigwaitinfo(3). o $seconds - Timeout in seconds. o $nanoseconds - Timeout in nanoseconds. RETURN VALUES
On success, pcntl_sigtimedwait(3) returns a signal number. SEE ALSO
pcntl_sigprocmask(3), pcntl_sigwaitinfo(3). PHP Documentation Group PCNTL_SIGTIMEDWAIT(3)

Check Out this Related Man Page

PCNTL_SIGNAL_DISPATCH(3)						 1						  PCNTL_SIGNAL_DISPATCH(3)

pcntl_signal_dispatch - Calls signal handlers for pending signals

SYNOPSIS
bool pcntl_signal_dispatch (void ) DESCRIPTION
The pcntl_signal_dispatch(3) function calls the signal handlers installed by pcntl_signal(3) for each pending signal. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 pcntl_signal_dispatch(3) example <?php echo "Installing signal handler... "; pcntl_signal(SIGHUP, function($signo) { echo "signal handler called "; }); echo "Generating signal SIGHUP to self... "; posix_kill(posix_getpid(), SIGHUP); echo "Dispatching... "; pcntl_signal_dispatch(); echo "Done "; ?> The above example will output something similar to: Installing signal handler... Generating signal SIGHUP to self... Dispatching... signal handler called Done SEE ALSO
pcntl_signal(3), pcntl_sigprocmask(3), pcntl_sigwaitinfo(3), pcntl_sigtimedwait(3). PHP Documentation Group PCNTL_SIGNAL_DISPATCH(3)
Man Page