diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2010-10-16 08:31:55 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2010-10-16 08:31:55 +0000 |
commit | f56b4ec2ffa6d5667a3bd86040a1c771c1de33a5 (patch) | |
tree | a06294130e18067eca755eb7e91ad6faa548e55c /tmux.c | |
parent | 6c42f1a89e16d69d5fe24bb8b3f6b37148cfa308 (diff) | |
download | rtmux-f56b4ec2ffa6d5667a3bd86040a1c771c1de33a5.tar.gz rtmux-f56b4ec2ffa6d5667a3bd86040a1c771c1de33a5.tar.bz2 rtmux-f56b4ec2ffa6d5667a3bd86040a1c771c1de33a5.zip |
Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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"); } |