[Process] Workaround for windows based stderr bug
This commit is contained in:
parent
90f5420ada
commit
0c089d8fe3
@ -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);
|
$process = proc_open($this->commandline, $descriptors, $pipes, $this->cwd, $this->env, $this->options);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user