Commit 7cb38635 authored by Brad King's avatar Brad King
Browse files

BUG: Do not disown if process has already been killed or the timeout expired. ...

BUG: Do not disown if process has already been killed or the timeout expired.  Also need to call kwsysProcessCleanup to disown.
parent 39a13736
......@@ -711,7 +711,8 @@ kwsysEXPORT void kwsysProcess_Disown(kwsysProcess* cp)
int i;
/* Make sure a detached child process is running. */
if(!cp || !cp->Detached || cp->State != kwsysProcess_State_Executing)
if(!cp || !cp->Detached || cp->State != kwsysProcess_State_Executing ||
cp->TimeoutExpired || cp->Killed)
{
return;
}
......@@ -740,6 +741,10 @@ kwsysEXPORT void kwsysProcess_Disown(kwsysProcess* cp)
}
}
/* We will not wait for exit, so cleanup now. */
kwsysProcessCleanup(cp, 0);
/* The process has been disowned. */
cp->State = kwsysProcess_State_Disowned;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment