in reply to Re^2: Can't spawn "cmd.exe":
in thread Can't spawn "cmd.exe":
Indeed I can:
C:\test\test\test>test.pl About to try fail 1 0 : test.exe 1 : localhost 2 : root 3 : pwd Can't spawn "cmd": No error at C:\test\test\test\test.pl line 7. About to try fail 2 0 : test.exe 1 : localhost 2 : root 3 : pwd Can't spawn "test.exe localhost root pwd": No error at C:\test\test\te +st\test.pl line 11.
Same result whether the return value is -1 or -100_000.
The problem is with Perl's handling of Windows return codes. Trying to force fit a 32-bit signed int into an unsigned char doesn't go :)
As for what constitutes a "valid windows return code"--a signed integer covers it. Long ago, there was a convention that positive return codes were 'informational', negative 'failures', with zero being unadorned success.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can't spawn "cmd.exe":
by ikegami (Patriarch) on Mar 18, 2009 at 17:21 UTC | |
by BrowserUk (Patriarch) on Mar 18, 2009 at 23:11 UTC | |
by ikegami (Patriarch) on Mar 19, 2009 at 04:00 UTC | |
by BrowserUk (Patriarch) on Mar 19, 2009 at 11:01 UTC | |
by ikegami (Patriarch) on Mar 19, 2009 at 13:12 UTC | |
|