protected function GetProcess($projectPath) { if (!$this->getProcessInitialized) { register_shutdown_function(array($this, 'DestroyAllProcesses')); $this->getProcessInitialized = true; } if (!isset(self::$processes[$projectPath])) { GitPHP_DebugLog::GetInstance()->TimerStart(); $process = proc_open($cmd = $this->CreateCommand($projectPath, GIT_CAT_FILE, array('--batch')), array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('file', GitPHP_Util::NullFile(), 'w')), $pipes); self::$processes[$projectPath] = array('process' => $process, 'pipes' => $pipes); GitPHP_DebugLog::GetInstance()->TimerStop('proc_open', $cmd); } return self::$processes[$projectPath]; }