| 1044 | } |
| 1045 | |
| 1046 | kwsysEXPORT void kwsysProcess_Disown(kwsysProcess* cp) |
| 1047 | { |
| 1048 | /* Make sure a detached child process is running. */ |
| 1049 | if (!cp || !cp->Detached || cp->State != kwsysProcess_State_Executing || |
| 1050 | cp->TimeoutExpired || cp->Killed) { |
| 1051 | return; |
| 1052 | } |
| 1053 | |
| 1054 | /* Close all the pipes safely. */ |
| 1055 | kwsysProcessClosePipes(cp); |
| 1056 | |
| 1057 | /* We will not wait for exit, so cleanup now. */ |
| 1058 | kwsysProcessCleanup(cp, 0); |
| 1059 | |
| 1060 | /* The process has been disowned. */ |
| 1061 | cp->State = kwsysProcess_State_Disowned; |
| 1062 | } |
| 1063 | |
| 1064 | typedef struct kwsysProcessWaitData_s |
| 1065 | { |
searching dependent graphs…