From: andrey dot kalinovsky at gmail dot com Operating system: OSX, Ubuntu PHP version: Irrelevant Package: Program Execution Bug Type: Bug Bug description:proc_get_status update time when using proc_terminate
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) } -- Edit bug report at https://bugs.php.net/bug.php?id=64465&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64465&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64465&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64465&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64465&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64465&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64465&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64465&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64465&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64465&r=support Expected behavior: https://bugs.php.net/fix.php?id=64465&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64465&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64465&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64465&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64465&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64465&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64465&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64465&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64465&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64465&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64465&r=mysqlcfg