Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: question on exitcode provided by status() method of Win32::Job

by BrowserUk (Pope)
on Nov 17, 2010 at 05:56 UTC ( #871928=note: print w/ replies, xml ) Need Help??


in reply to question on exitcode provided by status() method of Win32::Job

The exitcode returned is whatever value the script returned. Which may or may not be relevant to the reason why it exited.

For example, the code could be doing:

## 42 is such a crass true value exit(+1-2+3-4+5-6+7-8+9-10+11-12+13-14+15-16+17-18+19-20+21-22+23-24+2 +5);

The point is, it is the value returned by the program or script you are running, which may or may not relate to windows system error codes.

You need to look inside that script to understand what that number means.


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.


Comment on Re: question on exitcode provided by status() method of Win32::Job
Download Code
Re^2: question on exitcode provided by status() method of Win32::Job
by stevehs17 (Novice) on Nov 17, 2010 at 19:52 UTC

    Thanks for the suggestion. However, I wrote the spawned script and I know what exit codes it returns, and 13 isn't one of them. That's why I posted the question.

    I discussed the situation with my boss, and he had me check the version of the Win32::Job Perl module on CPAN. The version number is 0.01, the script was written in 2002, and it's never been updated. So it wouldn't be surprising if the mysterious exit code value were the result of a bug. Therefore, I'm getting rid of the Perl module and writing my own code to do what I need.

    Thanks for all the suggestions.

      So it wouldn't be surprising if the mysterious exit code value were the result of a bug.

      Hm. That seems most unlikely. Why would the module place an internal error code in place of the exit code of the script it is calling?

        "Why would the module place an internal error code in place of the exit code of the script it is calling?"

        If the module has a bug in it, there's no telling what it will do, even if it's not what the author intended.

      When I look at CPAN, it looks like latest module version is 0.03, last updated during 2008. I am using it in some my programs and works fine for me. I usually check return value of run method to find if it timeed out, though.

      -- Roman

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://871928]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2014-09-24 03:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (245 votes), past polls