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?


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re^9: Can't spawn "cmd.exe": by BrowserUk
in thread Can't spawn "cmd.exe": by emalossi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.