summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessWin32.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-06-18 21:27:10 (GMT)
committerBrad King <brad.king@kitware.com>2003-06-18 21:27:10 (GMT)
commit30f4c011b05a3cc92c2268fd9be2b63812859410 (patch)
treeca42a26b411260e2d69af16004ccdf453677fb07 /Source/kwsys/ProcessWin32.c
parent5b6920ed16448ce774c5c1de54d2853d0fee0f72 (diff)
downloadCMake-30f4c011b05a3cc92c2268fd9be2b63812859410.zip
CMake-30f4c011b05a3cc92c2268fd9be2b63812859410.tar.gz
CMake-30f4c011b05a3cc92c2268fd9be2b63812859410.tar.bz2
BUG: Must return Exception status correctly.
Diffstat (limited to 'Source/kwsys/ProcessWin32.c')
-rw-r--r--Source/kwsys/ProcessWin32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index 3d1df05..f44d25e 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -975,10 +975,10 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
&cp->ExitCode))
{
/* The child exited. */
- cp->State = kwsysProcess_State_Exited;
if(cp->ExitCode & 0xC0000000)
{
/* Child terminated due to exceptional behavior. */
+ cp->State = kwsysProcess_State_Exception;
switch (cp->ExitCode)
{
case CONTROL_C_EXIT:
@@ -1016,6 +1016,7 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
else
{
/* Child exited normally. */
+ cp->State = kwsysProcess_State_Exited;
cp->ExitException = kwsysProcess_Exception_None;
cp->ExitValue = cp->ExitCode & 0x000000FF;
}