From 932f6cfbfc98ab2d6e593f7fa3473a6bb3269967 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 14 Jul 2017 18:49:07 +0000 Subject: 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). --- proc.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'proc.c') diff --git a/proc.c b/proc.c index 68738229..48e0d90c 100644 --- a/proc.c +++ b/proc.c @@ -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 * -- cgit