salva has asked for the wisdom of the Perl Monks concerning the following question:
I am wrapping an external executable on Windows that can exit with codes bigger than 255. The issue I am facing is that Perl $? seems to be limited to the combination of one byte for the signal and another byte for the errorlevel. For instance, when the program exits with code 1000 (0x3E8), $? becomes 59392 (0xE800).
Perl has also the variable ${^CHILD_ERROR_NATIVE}, but it seems that on Windows it gets the same value as $?.
Does anybody known how to get the real exit code without reverting to using an external module as Win32::Process to start and control the slave processes? (on the other hand, I am already using Win32::API, so solutions using it would be acceptable).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Unaltered child return code on Windows
by BrowserUk (Patriarch) on Dec 16, 2014 at 17:13 UTC | |
by salva (Canon) on Dec 16, 2014 at 17:49 UTC |
Back to
Seekers of Perl Wisdom