With --quiet, we should quiet the daemon we're starting too.
This commit is contained in:
parent
d1f7f0a304
commit
bf2cebf2d8
@ -1025,12 +1025,11 @@ int start_stop_daemon (int argc, char **argv)
|
|||||||
applet, redirect_stderr, strerror (errno));
|
applet, redirect_stderr, strerror (errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (background) {
|
/* We don't redirect stdin as some daemons may need it */
|
||||||
/* Hmmm, some daemons may need stdin? */
|
if (background || quiet || redirect_stdout)
|
||||||
dup2 (devnull_fd, STDIN_FILENO);
|
|
||||||
dup2 (stdout_fd, STDOUT_FILENO);
|
dup2 (stdout_fd, STDOUT_FILENO);
|
||||||
|
if (background || quiet || redirect_stderr)
|
||||||
dup2 (stderr_fd, STDERR_FILENO);
|
dup2 (stderr_fd, STDERR_FILENO);
|
||||||
}
|
|
||||||
|
|
||||||
for (i = getdtablesize () - 1; i >= 3; --i)
|
for (i = getdtablesize () - 1; i >= 3; --i)
|
||||||
close(i);
|
close(i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user