Bug #17097 Updated: exec() always reports -1- as the return value of the executed command

From: Date: Thu, 06 Jun 2002 09:45:47 +0000
Subject: Bug #17097 Updated: exec() always reports -1- as the return value of the executed command
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9614@lists.php.net to get a copy of this message
ID: 17097 Updated by: sander@php.net Reported By: djanix@hotmail.com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: win32 PHP Version: 4.0CVS-2002-05-08 New Comment: exec() != shell_exec() Previous Comments: ------------------------------------------------------------------------ [2002-05-08 10:33:38] djanix@hotmail.com testret.c i made... : #include <stdio.h> int main( int argc, char *argv[] ) { return atol(argv[1]); } compiled that into testret.exe.... test.php i made... : <? exec( 'c:\testret.exe 3', $rlines, $rval ); var_dump( $rval ); ?> outputs... int(1) -------------------- i've traced through the source a bunch trying to find what changed that broke it - my last build (worked fine) was from the cvs head sometime in feb - so the big changes that affect exec() are the streams. FG(pclose_ret) is not set correctly inside of exec() - i don't feel like getting into the streams right now to find it and i assume someone on the dev team has all of that fresh in their head and can probably find this problem quickly :) and it's obviously important since i'm sure many many people rely on exec()... -benjamin ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17097&edit=1

« previous php.bugs (#9614) next »