BUG: Must return Exception status correctly.
This commit is contained in:
parent
5b6920ed16
commit
30f4c011b0
@ -975,10 +975,10 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
|
|||||||
&cp->ExitCode))
|
&cp->ExitCode))
|
||||||
{
|
{
|
||||||
/* The child exited. */
|
/* The child exited. */
|
||||||
cp->State = kwsysProcess_State_Exited;
|
|
||||||
if(cp->ExitCode & 0xC0000000)
|
if(cp->ExitCode & 0xC0000000)
|
||||||
{
|
{
|
||||||
/* Child terminated due to exceptional behavior. */
|
/* Child terminated due to exceptional behavior. */
|
||||||
|
cp->State = kwsysProcess_State_Exception;
|
||||||
switch (cp->ExitCode)
|
switch (cp->ExitCode)
|
||||||
{
|
{
|
||||||
case CONTROL_C_EXIT:
|
case CONTROL_C_EXIT:
|
||||||
@ -1016,6 +1016,7 @@ int kwsysProcess_WaitForExit(kwsysProcess* cp, double* userTimeout)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Child exited normally. */
|
/* Child exited normally. */
|
||||||
|
cp->State = kwsysProcess_State_Exited;
|
||||||
cp->ExitException = kwsysProcess_Exception_None;
|
cp->ExitException = kwsysProcess_Exception_None;
|
||||||
cp->ExitValue = cp->ExitCode & 0x000000FF;
|
cp->ExitValue = cp->ExitCode & 0x000000FF;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user