From 93591f27f37d68b71cf6dbc3112eb7e973a5b747 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Jun 2015 23:47:27 +0000 Subject: Make s6-log exit cleanly on SIGHUP even with -p --- src/daemontools-extras/s6-log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/daemontools-extras') diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c index a20562a..6d323b7 100644 --- a/src/daemontools-extras/s6-log.c +++ b/src/daemontools-extras/s6-log.c @@ -1130,12 +1130,11 @@ static inline void handle_signals (void) break ; } case SIGTERM : - { if (flagprotect) break ; + case SIGHUP : handle_stdin = &last_stdin ; if (!indata.len) prepare_to_exit() ; break ; - } case SIGCHLD : { for (;;) @@ -1206,6 +1205,7 @@ int main (int argc, char const *const *argv) sigset_t set ; sigemptyset(&set) ; sigaddset(&set, SIGTERM) ; + sigaddset(&set, SIGHUP) ; sigaddset(&set, SIGALRM) ; sigaddset(&set, SIGCHLD) ; if (selfpipe_trapset(&set) < 0) -- cgit v1.2.3