summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/ProcessUNIX.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/ProcessUNIX.c')
-rw-r--r--Source/kwsys/ProcessUNIX.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index 849f6b9..31e34ed 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -905,7 +905,6 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length,
kwsysProcess_Kill(cp);
cp->Killed = 0;
cp->SelectError = 1;
- cp->PipesLeft = 0;
}
}
@@ -943,7 +942,6 @@ int kwsysProcess_WaitForData(kwsysProcess* cp, char** data, int* length,
kwsysProcess_Kill(cp);
cp->Killed = 0;
cp->TimeoutExpired = 1;
- cp->PipesLeft = 0;
return kwsysProcess_Pipe_None;
}
}
@@ -1076,6 +1074,13 @@ void kwsysProcess_Kill(kwsysProcess* cp)
kwsysProcessKill(cp->ForkPIDs[i]);
}
}
+
+ /* Close all the pipe read ends. */
+ for(i=0; i < KWSYSPE_PIPE_COUNT; ++i)
+ {
+ kwsysProcessCleanupDescriptor(&cp->PipeReadEnds[i]);
+ }
+ cp->PipesLeft = 0;
}
/*--------------------------------------------------------------------------*/