pcntl_wexitstatus
Description
The pcntl_wexitstatus of PCNTL for PHP returns the return code of a terminated child.
Syntax
pcntl_wexitstatus( int $status ): int|false
Parameters
status
The status parameter is the status parameter supplied to a successful call to pcntl_waitpid().
Return
Returns the return code. If the functionality is not supported by the OS, false is returned.
Examples
1 · status
<? $process_id = 0; pcntl_waitpid($process_id, $status); $return = pcntl_wexitstatus($status); echo $return; ?>
0
Links
Related
PCNTL
- pcntl_alarm
- pcntl_async_signals
- pcntl_errno
- pcntl_exec
- pcntl_fork
- pcntl_get_last_error
- pcntl_getpriority
- pcntl_rfork
- pcntl_setpriority
- pcntl_signal
- pcntl_signal_dispatch
- pcntl_signal_get_handler
- pcntl_sigprocmask
- pcntl_sigtimedwait
- pcntl_sigwaitinfo
- pcntl_strerror
- pcntl_unshare
- pcntl_wait
- pcntl_waitpid
- pcntl_wifexited
- pcntl_wifsignaled
- pcntl_wifstopped
- pcntl_wstopsig
- pcntl_wtermsig