Bug #17097 Updated: exec() always reports -1- as the return value of the executed command
| From: | edink@php.net | Date: | Thu, 06 Jun 2002 10:03:55 +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-9621@lists.php.net to get a copy of this message | ||
ID: 17097
Updated by: edink@php.net
Reported By: djanix@hotmail.com
Status: Bogus
Bug Type: Filesystem function related
Operating System: win32
PHP Version: 4.0CVS-2002-05-08
New Comment:
Just FYI, I could not reporoduce this. The latest sapshot prints int(3)
as it should.
Previous Comments:
------------------------------------------------------------------------
[2002-06-06 05:45:47] sander@php.net
exec() != shell_exec()
------------------------------------------------------------------------
[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