Close open processes properly
Close open processes properly

--- a/include/git/GitExe.class.php
+++ b/include/git/GitExe.class.php
@@ -217,8 +217,13 @@
 
 	protected function DestroyProcess($projectPath)
 	{
-		proc_terminate(self::$processes[$projectPath]);
-		proc_close(self::$processes[$projectPath]);
+		$pipes = self::$processes[$projectPath]['pipes'];
+		foreach ($pipes as $pipe) {
+			fclose($pipe);
+		}
+		$process = self::$processes[$projectPath]['process'];
+		proc_terminate($process);
+		proc_close($process);
 		unset(self::$processes[$projectPath]);
 	}
 

comments