|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-03-20 15:56 UTC] andrey dot kalinovsky at gmail dot com
[2013-03-20 19:16 UTC] aharvey@php.net
-Status: Open
+Status: Not a bug
[2013-03-20 19:16 UTC] aharvey@php.net
[2013-03-20 19:20 UTC] andrey dot kalinovsky at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ After proc_terminate has been called, there is a time during which proc_get_status will still describe the child process as running. Test script: --------------- <?php $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "w") ); $process = proc_open("sleep 20", $descriptorspec, $pipes); var_dump(proc_get_status($process)); proc_terminate($process); var_dump(proc_get_status($process)); sleep(1); var_dump(proc_get_status($process)); Expected result: ---------------- array(8) { 'command' => string(8) "sleep 20" 'pid' => int(14027) 'running' => bool(true) 'signaled' => bool(false) 'stopped' => bool(false) 'exitcode' => int(-1) 'termsig' => int(0) 'stopsig' => int(0) } array(8) { 'command' => string(8) "sleep 20" 'pid' => int(14027) 'running' => bool(false) 'signaled' => bool(true) 'stopped' => bool(false) 'exitcode' => int(-1) 'termsig' => int(15) 'stopsig' => int(0) } array(8) { 'command' => string(8) "sleep 20" 'pid' => int(14027) 'running' => bool(false) 'signaled' => bool(true) 'stopped' => bool(false) 'exitcode' => int(-1) 'termsig' => int(15) 'stopsig' => int(0) } Actual result: -------------- array(8) { 'command' => string(8) "sleep 20" 'pid' => int(14027) 'running' => bool(true) 'signaled' => bool(false) 'stopped' => bool(false) 'exitcode' => int(-1) 'termsig' => int(0) 'stopsig' => int(0) } array(8) { 'command' => string(8) "sleep 20" 'pid' => int(14027) 'running' => bool(true) 'signaled' => bool(false) 'stopped' => bool(false) 'exitcode' => int(-1) 'termsig' => int(0) 'stopsig' => int(0) } array(8) { 'command' => string(8) "sleep 20" 'pid' => int(14027) 'running' => bool(false) 'signaled' => bool(true) 'stopped' => bool(false) 'exitcode' => int(-1) 'termsig' => int(15) 'stopsig' => int(0) }