ID: 38542 Updated by: [EMAIL PROTECTED] Reported By: php at bouchery dot com -Status: Open +Status: Feedback Bug Type: Program Execution Operating System: Windows XP PHP Version: 5.1.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-08-22 09:25:52] php at bouchery dot com Description: ------------ proc_get_status return the wrong PID Reproduce code: --------------- <?php $cmd = 'notepad'; $descriptorspec = array( 0 => array('pipe', 'r' ), 1 => array('pipe', 'w' ), 2 => array('pipe', 'w' ) ); $process = proc_open($cmd, $descriptorspec, $pipes); $status = proc_get_status( $process ); echo 'PID = ', $status['pid'], "\n"; passthru( 'tasklist /fi "imagename eq notepad.exe"'); echo "\n\n"; passthru( 'tasklist /fi "pid eq ' . $status['pid'] . '"' ); echo "\n\n"; ?> Expected result: ---------------- proc_get_status should return the notepad's PID Actual result: -------------- It returns a PID which doesn't exist or associate to a process which is not related to the script context. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38542&edit=1
