Only grab SIGHUP if we can do something with it.
This commit is contained in:
@@ -90,6 +90,7 @@ void log_init() {
|
||||
}
|
||||
|
||||
void log_init_peer() {
|
||||
if (log_path) {
|
||||
sigset_t sigmask;
|
||||
assert(!sigemptyset(&sigmask));
|
||||
assert(!sigaddset(&sigmask, SIGHUP));
|
||||
@@ -99,6 +100,9 @@ void log_init_peer() {
|
||||
peer_epoll_add(&log_rotate_peer, EPOLLIN);
|
||||
|
||||
assert(!sigprocmask(SIG_BLOCK, &sigmask, NULL));
|
||||
} else {
|
||||
log_rotate_peer.fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void log_cleanup_peer() {
|
||||
|
||||
Reference in New Issue
Block a user