Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm running a script on Windows that generates a SIGSEGV(11) when run on Linux. The signal is one of many possible results from running another program via open to a pipe.

However on Windows I'm getting a return value of 9984 rather than something I can & 0x0F to get the proper signal code.

I'm running Active State perl 5.6 (ok I know this is archaic, but I'm not getting our folks to upgrade this any time soon). I'm also using the system shell in my open command because, I guess I'm redirecting STDERR into STDOUT, or so that is the intention.

So my question is where can I get Windows error codes so I can properly interpret system errors? I don't see these published anywhere...

Thanks.

Replies are listed 'Best First'.
Re: Windows Error Codes
by BrowserUk (Patriarch) on Nov 01, 2008 at 04:27 UTC

    Hm. Are you using something called "Lasso"? Or that uses files with a .lasso extension?

    Normally, you can look up Win32 system error codes here. (Disable author css if you are in a hurry and your browser allows it. (I do that for *all* MS sites. It's just so much quicker, and more readable!)).

    However, if there was a 9984 system error code, then it would appear on this page...but it doesn't.

    And googling for it turns up dozens of explicit hits and the common theme amongst them seems to be "a missing .lasso file". Some sort of web framework?


    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.
Re: Windows Error Codes
by rowdog (Curate) on Nov 01, 2008 at 15:49 UTC

    I don't know the windows stuff but signal 11 on Linux means your program is accessing memory that doesn't own. I find that rather strange for a pure Perl program and one common cause for signal 11 is bad hardware (probably ram)

    Bitwizard has a nice Signal 11 FAQ and you may went to test your memory with memtest86.

    If your program uses xs, you may want to look for bad pointers.

Re: Windows Error Codes
by cdarke (Prior) on Nov 02, 2008 at 08:44 UTC
    As BrowserUK said, 9984 is not a standard Windows error code, but you don't say anything about the program you are running, or where you get the return code from, perl, open, system, or $?. Did you shift the return code right by 8 bits? 9984 >> 8 gives 34, which is ERROR_WRONG_DISK. Don't trust that too far, the application can return any old number that takes its fancy, it does not have to use "standard" Windows error codes.
Re: Windows Error Codes
by Anonymous Monk on Nov 01, 2008 at 03:08 UTC
    Maybe $^E?