summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/proc.c')
-rw-r--r--usr.bin/tmux/proc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/tmux/proc.c b/usr.bin/tmux/proc.c
index 3df1ffd2b8d..82891d27357 100644
--- a/usr.bin/tmux/proc.c
+++ b/usr.bin/tmux/proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.c,v 1.14 2017/07/14 08:04:23 nicm Exp $ */
+/* $OpenBSD: proc.c,v 1.15 2017/07/14 18:49:07 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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 *