diff options
author | Brad King <brad.king@kitware.com> | 2004-01-28 15:59:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-01-28 15:59:46 (GMT) |
commit | d23636d48b70ef76e88a0db666a6774130419bbc (patch) | |
tree | 1bf9f3ead8aa117dd09874596b5628e90e4da386 /Source/kwsys/ProcessWin32.c | |
parent | e27ad7eb97d728791190050463af8a31cf9b0e5f (diff) | |
download | CMake-d23636d48b70ef76e88a0db666a6774130419bbc.zip CMake-d23636d48b70ef76e88a0db666a6774130419bbc.tar.gz CMake-d23636d48b70ef76e88a0db666a6774130419bbc.tar.bz2 |
BUG: Corrected detection of exceptional exit code.
Diffstat (limited to 'Source/kwsys/ProcessWin32.c')
-rw-r--r-- | Source/kwsys/ProcessWin32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index a8fac89..05cc89e 100644 --- a/Source/kwsys/ProcessWin32.c +++ b/Source/kwsys/ProcessWin32.c @@ -1334,7 +1334,7 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout) { /* The children exited. Report the outcome of the last process. */ cp->ExitCode = cp->CommandExitCodes[cp->NumberOfCommands-1]; - if(cp->ExitCode & 0xC0000000) + if((cp->ExitCode & 0xF0000000) == 0xC0000000) { /* Child terminated due to exceptional behavior. */ cp->State = kwsysProcess_State_Exception; @@ -1343,10 +1343,10 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout) } else { - /* Child exited normally. */ + /* Child exited without exception. */ cp->State = kwsysProcess_State_Exited; cp->ExitException = kwsysProcess_Exception_None; - cp->ExitValue = cp->ExitCode & 0x000000FF; + cp->ExitValue = cp->ExitCode; } } |