in reply to Re: Why doesn't 'system' return '-1' when a program fails to start on Windows?
in thread Why doesn't 'system' return '-1' when a program fails to start on Windows?

http://perldoc.perl.org/perlport.html#system Failure to spawn() a subprocess is indicated by setting $? to "255 << 8" i think that is where 65280 is coming from, but i still like "fix 2", that wasnt the only place i found that fix proposed.

  • Comment on Re^2: Why doesn't 'system' return '-1' when a program fails to start on Windows?

Replies are listed 'Best First'.
Re^3: Why doesn't 'system' return '-1' when a program fails to start on Windows?
by jkahrman (Acolyte) on Feb 24, 2017 at 19:56 UTC
    http://perldoc.perl.org/perlport.html#system Failure to spawn() a subprocess is indicated by setting $? to "255 << 8"

    I definitely missed that. Seems like an odd choice for a sentinel value, though. I'm surprised '-1' wasn't used for consistency.