note 117934 added to function.proc-close
| From: | UweOhse | Date: | Thu, 03 Sep 2015 11:12:22 +0000 |
| Subject: | note 117934 added to function.proc-close | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203614@lists.php.net to get a copy of this message | ||
Regarding: "Returns the termination status of the process that was run. In case of an error
then -1 is returned."
This is, at best, misleading. It returns:
* -1 on error,
* WEXITSTATUS(status) if WIFEXITED(status) is true, or
* status if WIFEXITED(status) is false,
where status is the status parameter of waitpid().
This makes it impossible to differentiate between a relatively normal exit or a termination by
signal, and reduces the value of the proc_close return code to a binary one (ok / something broke).
This can be seen in proc_open_rsrc_dtor() in ext/standard/proc_open.c (PHP 5.4.44, 5.6.12).
----
Server IP: 72.52.91.14
Probable Submitter: 213.160.5.140
----
Manual Page -- http://php.net/manual/en/function.proc-close.php
Edit -- https://master.php.net/note/edit/117934
Del: integrated -- https://master.php.net/note/delete/117934/integrated
Del: useless -- https://master.php.net/note/delete/117934/useless
Del: bad code -- https://master.php.net/note/delete/117934/bad+code
Del: spam -- https://master.php.net/note/delete/117934/spam
Del: non-english -- https://master.php.net/note/delete/117934/non-english
Del: in docs -- https://master.php.net/note/delete/117934/in+docs
Del: other reasons-- https://master.php.net/note/delete/117934
Reject -- https://master.php.net/note/reject/117934
Search -- https://master.php.net/manage/user-notes.php