PHP Process Control Functions
EditRocket provides the following information on Process Control functions in the PHP source code builder.
int pcntl_alarm ( int $seconds ) - Creates a timer that will send a SIGALRM signal to the process after the given number of seconds. Any call to pcntl_alarm() will cancel any previously set alarm.
void pcntl_exec ( string $path [, array $args [, array $envs ]] ) - Executes the program with the given arguments.
int pcntl_fork ( void ) - The pcntl_fork() function creates a child process that differs from the parent process only in its PID and PPID. Please see your system's fork(2) man page for specific details as to how fork works on your system.
int pcntl_getpriority ([ int $pid [, int $process_identifier ]] ) - pcntl_getpriority() gets the priority of pid. Because priority levels can differ between system types and kernel versions, please see your system's getpriority(2) man page for specific details.
bool pcntl_setpriority ( int $priority [, int $pid [, int $process_identifier ]] ) - pcntl_setpriority() sets the priority of pid.
bool pcntl_signal ( int $signo , callback $handler [, bool $restart_syscalls ] ) - The pcntl_signal() function installs a new signal handler for the signal indicated by signo.
int pcntl_wait ( int &$status [, int $options ] ) - The wait function suspends execution of the current process until a child has exited, or until a signal is delivered whose action is to terminate the current process or to call a signal handling function. If a child has already exited by the time of the call (a so-called zombie process), the function returns immediately. Any system resources used by the child are freed. Please see your system's wait(2) man page for specific details as to how wait works on your system.
int pcntl_waitpid ( int $pid , int &$status [, int $options ] ) - Suspends execution of the current process until a child as specified by the pid argument has exited, or until a signal is delivered whose action is to terminate the current process or to call a signal handling function.
int pcntl_wexitstatus ( int $status ) - Returns the return code of a terminated child.
bool pcntl_wifexited ( int $status ) - Checks whether the child status code represents a normal exit.
bool pcntl_wifsignaled ( int $status ) - Checks whether the child process exited because of a signal which was not caught.
bool pcntl_wifstopped ( int $status ) -
int pcntl_wstopsig ( int $status ) - Returns the number of the signal which caused the child to stop.
int pcntl_wtermsig ( int $status ) - Returns the number of the signal that caused the child process to terminate.