#38542 [NEW]: proc_get_status : wrong PID

From: Date: Tue, 22 Aug 2006 09:25:52 +0000
Subject: #38542 [NEW]: proc_get_status : wrong PID
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-101101@lists.php.net to get a copy of this message
From: php at bouchery dot com Operating system: Windows XP PHP version: 5.1.5 PHP Bug Type: Program Execution Bug description: proc_get_status : wrong PID 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 bug report at http://bugs.php.net/?id=38542&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38542&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38542&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38542&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38542&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38542&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38542&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38542&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38542&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38542&r=support Expected behavior: http://bugs.php.net/fix.php?id=38542&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38542&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38542&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38542&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38542&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38542&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38542&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38542&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38542&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38542&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38542&r=mysqlcfg

« previous php.bugs (#101101) next »