BUG: Do not wait for children to exit when killing them. Sometimes they do not really die.

This commit is contained in:
Brad King 2004-05-13 10:08:09 -04:00
parent 5b145fe592
commit b6fb2fe8f9
1 changed files with 2 additions and 6 deletions

View File

@ -1268,7 +1268,6 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length,
{ {
/* The process timeout has expired. Kill the child now. */ /* The process timeout has expired. Kill the child now. */
kwsysProcess_Kill(cp); kwsysProcess_Kill(cp);
cp->State = kwsysProcess_State_Expired;
cp->TimeoutExpired = 1; cp->TimeoutExpired = 1;
cp->Killed = 0; cp->Killed = 0;
return kwsysProcess_Pipe_None; return kwsysProcess_Pipe_None;
@ -1409,11 +1408,8 @@ void kwsysProcess_Kill(kwsysProcess* cp)
} }
} }
/* Wait for windows to finish cleaning up the children. */ /* We are killing the children and ignoring all data. Do not wait
for(i=0; i < cp->NumberOfCommands; ++i) for them to exit. */
{
WaitForSingleObject(cp->ProcessInformation[i].hProcess, INFINITE);
}
} }
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/