Name

proc_get_status

Synopsis

array proc_get_status(resource handle)

Returns an associative array containing information about the process handle, previously opened by proc_open(). The array contains the following values:

command

The command string this process was opened with.

pid

The process ID.

running

true if the process is currently running, or false otherwise.

signaled

true if the process has been terminated by an uncaught signal, or false otherwise.

stopped

true if the process has been stopped by a signal, or false otherwise.

exitcode

If the process has terminated, the exit code from the process, or –1 otherwise.

termsig

The signal that caused the process to be terminated if signaled is true, or undefined otherwise.

stopsig

The signal that caused the process to be stopped if stopped is true, or undefined otherwise.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.