forked from external/yambar
module/script: don’t re-direct stderr to /dev/null
This commit is contained in:
parent
aa34925f54
commit
e0169d38f3
1 changed files with 2 additions and 3 deletions
|
@ -463,13 +463,12 @@ run(struct module *mod)
|
||||||
close(exec_pipe[0]);
|
close(exec_pipe[0]);
|
||||||
close(comm_pipe[0]);
|
close(comm_pipe[0]);
|
||||||
|
|
||||||
/* Re-direct stdin/stdout/stderr */
|
/* Re-direct stdin/stdout */
|
||||||
int dev_null = open("/dev/null", O_RDWR);
|
int dev_null = open("/dev/null", O_RDONLY);
|
||||||
if (dev_null < 0)
|
if (dev_null < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (dup2(dev_null, STDIN_FILENO) < 0 ||
|
if (dup2(dev_null, STDIN_FILENO) < 0 ||
|
||||||
dup2(dev_null, STDERR_FILENO) < 0 ||
|
|
||||||
dup2(comm_pipe[1], STDOUT_FILENO) < 0)
|
dup2(comm_pipe[1], STDOUT_FILENO) < 0)
|
||||||
{
|
{
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Add table
Reference in a new issue