summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tmux.c b/tmux.c
index 842fd1b9..fe1fd394 100644
--- a/tmux.c
+++ b/tmux.c
@@ -223,6 +223,8 @@ shell_exec(const char *shell, const char *shellcmd)
xasprintf(&argv0, "%s", shellname);
setenv("SHELL", shell, 1);
+ closefrom(STDERR_FILENO + 1);
+
execl(shell, argv0, "-c", shellcmd, (char *) NULL);
fatal("execl failed");
}