diff options
| author | 2010-10-16 08:31:55 +0000 | |
|---|---|---|
| committer | 2010-10-16 08:31:55 +0000 | |
| commit | 498ee386b9918bef2572558cec924a9cc88f5a02 (patch) | |
| tree | 804ef79e7c2445a67e8588c736336e237efe5fa5 /usr.bin/tmux/tmux.c | |
| parent | Fall back on normal session choice method if $TMUX exists but is invalid (diff) | |
| download | wireguard-openbsd-498ee386b9918bef2572558cec924a9cc88f5a02.tar.xz wireguard-openbsd-498ee386b9918bef2572558cec924a9cc88f5a02.zip | |
Trying to set FD_CLOEXEC on every fd is a lost cause, just use
closefrom() before exec.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
| -rw-r--r-- | usr.bin/tmux/tmux.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c index bf8883276d4..04119f5f5d8 100644 --- a/usr.bin/tmux/tmux.c +++ b/usr.bin/tmux/tmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.89 2010/10/14 17:38:39 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.90 2010/10/16 08:31:55 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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"); } |
