diff options
author | Brad King <brad.king@kitware.com> | 2004-07-07 21:46:34 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-07-07 21:46:34 (GMT) |
commit | 55c1c3b33fceeb7be5d2c9557559585c919a4800 (patch) | |
tree | ce31f5ab11584ee5829b97bb5952b3cc70b9cd31 /Source/kwsys | |
parent | ae28d93a72850d5d48bc8e941af5e99c4f8f2202 (diff) | |
download | CMake-55c1c3b33fceeb7be5d2c9557559585c919a4800.zip CMake-55c1c3b33fceeb7be5d2c9557559585c919a4800.tar.gz CMake-55c1c3b33fceeb7be5d2c9557559585c919a4800.tar.bz2 |
BUG: Do not disown if process has already been killed or the timeout expired. Also need to call kwsysProcessCleanup to disown.
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index c91afb2..e02fbfb 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -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; } |