diff options
author | nicm <nicm> | 2017-07-14 18:49:07 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-07-14 18:49:07 +0000 |
commit | 932f6cfbfc98ab2d6e593f7fa3473a6bb3269967 (patch) | |
tree | 458fd646c28b3655f2ca1ca6a228188cc49ca2e0 /proc.c | |
parent | 2678fe53f57c4a3222780c76a7201f4300058e59 (diff) | |
download | rtmux-932f6cfbfc98ab2d6e593f7fa3473a6bb3269967.tar.gz rtmux-932f6cfbfc98ab2d6e593f7fa3473a6bb3269967.tar.bz2 rtmux-932f6cfbfc98ab2d6e593f7fa3473a6bb3269967.zip |
Because ignore SIGCHLD early, letting signal_del restore it doesn't work
correctly, so set it explicitly back to default (and the others for good
measure).
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -242,7 +242,7 @@ proc_set_signals(struct tmuxproc *tp, void (*signalcb)(int)) } void -proc_clear_signals(struct tmuxproc *tp) +proc_clear_signals(struct tmuxproc *tp, int defaults) { struct sigaction sa; @@ -262,6 +262,16 @@ proc_clear_signals(struct tmuxproc *tp) signal_del(&tp->ev_sigusr1); signal_del(&tp->ev_sigusr2); signal_del(&tp->ev_sigwinch); + + if (defaults) { + sigaction(SIGHUP, &sa, NULL); + sigaction(SIGCHLD, &sa, NULL); + sigaction(SIGCONT, &sa, NULL); + sigaction(SIGTERM, &sa, NULL); + sigaction(SIGUSR1, &sa, NULL); + sigaction(SIGUSR2, &sa, NULL); + sigaction(SIGWINCH, &sa, NULL); + } } struct tmuxpeer * |