in reply to Re: Killing a process on Windows (Win32::Process question)
in thread Killing a process on Windows (Win32::Process question)

Thanks a lot for the elaborate and extremely helpful answer!

For example 9, translates to The storage control block address is invalid.

I didn't know that there are exit codes with predefined meaning. Do you happen to know where I find a list of these codes? In my case, the reason would be "Killing because of Timeout" (the process runs for too long time).

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^3: Killing a process on Windows (Win32::Process question)
by BrowserUk (Patriarch) on May 13, 2009 at 15:44 UTC

    16000 and counting.

    You can look through to find something very specific for your purposes--which would be a damn sight easier if they would put them all on one searchable page.

    A couple that might be suitable that I already encountered before are:

    ERROR_CONTROL_C_EXIT 572 (0x23C) ERROR_FATAL_APP_EXIT 713 (0x2C9)

    Generic enough that they aren't likely to be confused with any "expected values"--specific enough to suggest something abnormal happened.


    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^3: Killing a process on Windows (Win32::Process question)
by cdarke (Prior) on May 13, 2009 at 15:41 UTC
    winerror.h
    The closest I can find is ERROR_TIMEOUT which has a value of 1460. Unfortunately the Windows implementation of Perl does not allow return codes > 255 from a process (because of Perl's UNIX history).
      Perl does not allow return codes > 255 from a process

      Perl screws up dealing with return codes internally, but it does allow perl processes to return values greater than 255:

      C:\test>perl -e"exit(511)" & echo %errorlevel% 511

      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.