Oh for goodness sake. Both statements I made are correct.
Negative values returned from Perl's win32_spawn mean the spawn failed.
And (as I said), that is an error in Perl's handling of Win32 exit values. It assigns meaning to the sign bit of the return value that means it later (in the code you posted) cannot tell the difference between it's own internal "spawn failed" flag value, and legitimate process exit values.
That is, as I keep having to state, an error in perl's handling of Win32 exit codes.
As shown, that never occurs when you get that warning.
I didn't make any statement about when that reduction occured. And quite frankly I don't give a toss about your misinterpretation of what I did say.
But I will point out that by the time the message is output, a partial truncation, ovewrite or mis-interpretation of the sign bit of the process return value has already occured. Indeed, it is for that very reason the message is displayed when it should not be.
Ie. Although win32_spawn() knows that the CreateProcess() succeeded, when it passes back the process exit value to it's calling code, if that exit code in negative, then the calling code cannot distinguish that legitimate value from the -1 'flag value' that win32_spawn() returns when the CreateProcess() fails.
So, both statements I made are correct. And your characterisation of those statements as "quite wrong" is quite wrong.
Wanna go again?
In reply to Re^9: Can't spawn "cmd.exe":
by BrowserUk
in thread Can't spawn "cmd.exe":
by emalossi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |