nghttpx: Make tty to false when daemonized

This commit is contained in:
Tatsuhiro Tsujikawa 2014-06-12 00:19:01 +09:00
parent a15d4fc306
commit 6a2950aef0
2 changed files with 5 additions and 1 deletions

View File

@ -280,6 +280,10 @@ int event_loop()
LOG(FATAL) << "Failed to daemonize: " << strerror(errno);
exit(EXIT_FAILURE);
}
// Set tty = false when daemonized. syslog is garbling with ANSI
// escape.
mod_config()->tty = false;
}
if(get_config()->pid_file) {

View File

@ -251,7 +251,7 @@ struct Config {
bool insecure;
bool backend_ipv4;
bool backend_ipv6;
// true if stderr refers to a terminal.
// true if stderr refers to a terminal and not daemonized
bool tty;
bool http2_no_cookie_crumbling;
bool upstream_frame_debug;