s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

commit 93591f27f37d68b71cf6dbc3112eb7e973a5b747
parent f3bbf0f162a3af9646949cb757386f511d9bd5fa
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Thu, 18 Jun 2015 23:47:27 +0000

 Make s6-log exit cleanly on SIGHUP even with -p

Diffstat:
Msrc/daemontools-extras/s6-log.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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)