mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
* daemon mode must imply 'quiet' and disable 'verbose' as
stdout/stderr file descriptors are closed.
This commit is contained in:
parent
edb12df477
commit
e3283d1cd3
1 changed files with 6 additions and 1 deletions
|
|
@ -8047,10 +8047,15 @@ int main(int argc, char **argv) {
|
|||
signal(SIGTTOU, sig_pause);
|
||||
signal(SIGTTIN, sig_listen);
|
||||
|
||||
if (global.mode & MODE_DAEMON) {
|
||||
global.mode &= ~MODE_VERBOSE;
|
||||
global.mode |= MODE_QUIET;
|
||||
}
|
||||
|
||||
/* MODE_QUIET can inhibit alerts and warnings below this line */
|
||||
|
||||
global.mode &= ~MODE_STARTING;
|
||||
if (global.mode & MODE_QUIET) {
|
||||
if ((global.mode & MODE_QUIET) && !(global.mode & MODE_VERBOSE)) {
|
||||
/* detach from the tty */
|
||||
fclose(stdin); fclose(stdout); fclose(stderr);
|
||||
close(0); close(1); close(2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue