Stop redirecting stderr with proc_open

Error outputs were piped to a temporary buffer that wasn’t read by
anyone, making debugging hard because errors were completely silenced.
By not explicitly redirecting stderr on proc_open, the subprocess
inherits its parent stderr.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Frédéric Mangano-Tarumi 2020-07-27 14:44:03 +02:00 committed by Lukas Fleischer
parent a1a742b518
commit 9290eee138
2 changed files with 0 additions and 4 deletions

View file

@ -1347,7 +1347,6 @@ function notify($params) {
$descspec = array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'w')
);
$p = proc_open($cmd, $descspec, $pipes);
@ -1358,7 +1357,6 @@ function notify($params) {
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
return proc_close($p);
}

View file

@ -96,7 +96,6 @@ function render_comment($id) {
$descspec = array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'w')
);
$p = proc_open($cmd, $descspec, $pipes);
@ -107,7 +106,6 @@ function render_comment($id) {
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
return proc_close($p);
}