pcntl_wifexited

(PHP 4 >= 4.1.0, PHP 5)

pcntl_wifexited --  Returns TRUE if status code represents a successful exit

Description

bool pcntl_wifexited ( int status )

Returns TRUE if the child status code represents a successful exit.

Параметр status - это переменная, переданная по ссылке в функцию pcntl_waitpid().

See also pcntl_waitpid() and pcntl_wexitstatus().



pcntl_wifexited
10-May-2005 10:43
The documentation claims a TRUE return in the case of a "successful exit", but that is misleading.  If you read the unix man page for the underlying WIFEXITED() macro, you will find that it returns TRUE in the case of a "normal exit".  In other words, this function returns TRUE if the child process ended by returning from main() or by calling an exit() function.  It returns FALSE in other cases, such as when the child process was terminated with a signal.  This function does not test the child's numeric exit code for success or failure.

<pcntl_wexitstatuspcntl_wifsignaled>
 Last updated: Tue, 15 Nov 2005