summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authornicm <nicm>2017-07-14 18:49:07 +0000
committernicm <nicm>2017-07-14 18:49:07 +0000
commit932f6cfbfc98ab2d6e593f7fa3473a6bb3269967 (patch)
tree458fd646c28b3655f2ca1ca6a228188cc49ca2e0 /client.c
parent2678fe53f57c4a3222780c76a7201f4300058e59 (diff)
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 'client.c')
-rw-r--r--client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/client.c b/client.c
index efc82e5f..743ed33a 100644
--- a/client.c
+++ b/client.c
@@ -365,7 +365,6 @@ client_main(struct event_base *base, int argc, char **argv, int flags)
if (client_exittype == MSG_EXEC) {
if (client_flags & CLIENT_CONTROLCONTROL)
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &saved_tio);
- proc_clear_signals(client_proc);
client_exec(client_execshell, client_execcmd);
}
@@ -481,6 +480,8 @@ client_exec(const char *shell, const char *shellcmd)
xasprintf(&argv0, "%s", name);
setenv("SHELL", shell, 1);
+ proc_clear_signals(client_proc, 1);
+
setblocking(STDIN_FILENO, 1);
setblocking(STDOUT_FILENO, 1);
setblocking(STDERR_FILENO, 1);
@@ -628,7 +629,6 @@ client_dispatch_wait(struct imsg *imsg)
if (datalen == 0 || data[datalen - 1] != '\0')
fatalx("bad MSG_SHELL string");
- proc_clear_signals(client_proc);
client_exec(data, shell_command);
/* NOTREACHED */
case MSG_DETACH: