{
struct mworker_proc *child, *it;
- if ((!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) &&
- (global.mode & MODE_DAEMON)) {
- /* detach from the tty, this is required to properly daemonize. */
- if ((getenv("HAPROXY_MWORKER_REEXEC") == NULL))
- stdio_quiet(-1);
- global.mode &= ~MODE_VERBOSE;
- global.mode |= MODE_QUIET; /* ensure that we won't say anything from now */
- }
proc_self->failedreloads = 0; /* reset the number of failure */
mworker_loop();
#if defined(USE_OPENSSL) && !defined(OPENSSL_NO_DH)
}
step_init_4();
+
+ /* set quiet mode if MODE_DAEMON */
+ if ((!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) &&
+ (global.mode & MODE_DAEMON)) {
+ /* detach from the tty, this is required to properly daemonize. */
+ if ((getenv("HAPROXY_MWORKER_REEXEC") == NULL))
+ stdio_quiet(-1);
+ global.mode &= ~MODE_VERBOSE;
+ global.mode |= MODE_QUIET; /* ensure that we won't say anything from now */
+ }
+
/* enter in master polling loop */
mworker_run_master();
}
/* Master enters in its polling loop */
if (master) {
+ /* set quiet mode if MODE_DAEMON */
+ if ((!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) &&
+ (global.mode & MODE_DAEMON)) {
+ /* detach from the tty, this is required to properly daemonize. */
+ if ((getenv("HAPROXY_MWORKER_REEXEC") == NULL))
+ stdio_quiet(-1);
+ global.mode &= ~MODE_VERBOSE;
+ global.mode |= MODE_QUIET; /* ensure that we won't say anything from now */
+ }
mworker_run_master();
/* never get there in master context */
}