From 30f4c011b05a3cc92c2268fd9be2b63812859410 Mon Sep 17 00:00:00 2001 From: Brad King <brad.king@kitware.com> Date: Wed, 18 Jun 2003 17:27:10 -0400 Subject: [PATCH] BUG: Must return Exception status correctly. --- Source/kwsys/ProcessWin32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c index 3d1df05cbb..f44d25e8cf 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; } -- GitLab