Problem with system() and return codes
| From: | Angus Mann | Date: | Thu, 14 Dec 2000 14:56:36 +0000 |
| Subject: | Problem with system() and return codes | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-4465@lists.php.net to get a copy of this message | ||
Hi all,
I'm having a problem getting the return code from an external program
(under Win32). Using system(), exec() or passthru() and specifying a
variable for the return value - e.g. system("program.exe", $retcode) -
always gives a $retcode of 0 - even when program.exe has a return code
of something other than 0.
I know that my external program is sending the correct return codes
(I'm using it in the exact same way with a Perl script without any
problems).
Has anyone else managed to get the correct return codes from system(),
or does anyone have any suggestions at all?
Thanks,
Angus.