Edit report at https://bugs.php.net/bug.php?id=61873&edit=1
ID: 61873 Updated by: larue...@php.net Reported by: dcb at insomniacsoft dot com Summary: proc_get_status always returns exitcode -1 -Status: Open +Status: Feedback Type: Bug Package: Program Execution Operating System: Linux PHP Version: 5.4.1 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ I can not reproduce this with php5.4-trunk. Previous Comments: ------------------------------------------------------------------------ [2012-04-28 03:13:59] dcb at insomniacsoft dot com Description: ------------ Since PHP 5.4.0 the proc_get_status and proc_close functions always return -1 as exitcode. Test script: --------------- $descriptorspec = array( 0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("file", "/tmp/error-output.txt", "a") ); $p = proc_open('/tmp/te', $descriptorspec, $pipes, '/tmp'); sleep(1); fclose($pipes[0]);fclose($pipes[1]); $s = proc_get_status($p); print_r($s); /tmp/te is simply: #!/bin/bash exit 0 Expected result: ---------------- Array ( [command] => /tmp/te [pid] => 12376 [running] => [signaled] => [stopped] => [exitcode] => 0 [termsig] => 0 [stopsig] => 0 ) Actual result: -------------- Array ( [command] => /tmp/te [pid] => 12376 [running] => [signaled] => [stopped] => [exitcode] => -1 [termsig] => 0 [stopsig] => 0 ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61873&edit=1