pcntl_signal
Description
bool pcntl_signal ( int signo, callback handle [, bool restart_syscalls])The pcntl_signal() function installs a new signal handler for the signal indicated by signo. The signal handler is set to handler which may be the name of a user created function, or either of the two global constants SIG_IGN or SIG_DFL. The optional restart_syscalls specifies whether system call restarting should be used when this signal arrives and defaults to TRUE.
Returns TRUE on success or FALSE on failure.
Note: The optional restart_syscalls parameter became available in PHP 4.3.0.
Note: The ability to use an object method as a callback became available in PHP 4.3.0. Note that when you set a handler to an object method, that object's reference count is increased which makes it persist until you either change the handler to something else, or your script ends.
See also pcntl_fork() and pcntl_waitpid().