[Process] Workaround for windows based stderr bug

This commit is contained in:
Adrian Rudnik 2011-05-14 17:25:55 +02:00
parent 90f5420ada
commit 0c089d8fe3

View File

@ -100,7 +100,14 @@ class Process
}
};
$descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'a'));
// Workaround for http://bugs.php.net/bug.php?id=51800
if (strstr(PHP_OS, 'WIN')) {
$stderrPipeMode = 'a';
} else {
$stderrPipeMode = 'w';
}
$descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', $stderrPipeMode));
$process = proc_open($this->commandline, $descriptors, $pipes, $this->cwd, $this->env, $this->options);