diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-06-18 23:47:27 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-06-18 23:47:27 +0000 |
commit | 93591f27f37d68b71cf6dbc3112eb7e973a5b747 (patch) | |
tree | df4291fdcd84dd972139e7fa8e2ad6eea0c1051c | |
parent | f3bbf0f162a3af9646949cb757386f511d9bd5fa (diff) | |
download | s6-93591f27f37d68b71cf6dbc3112eb7e973a5b747.tar.gz s6-93591f27f37d68b71cf6dbc3112eb7e973a5b747.tar.xz s6-93591f27f37d68b71cf6dbc3112eb7e973a5b747.zip |
Make s6-log exit cleanly on SIGHUP even with -p
-rw-r--r-- | src/daemontools-extras/s6-log.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |