mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 21:56:57 +00:00
Sync OpenBSD patchset 775:
Trying to set FD_CLOEXEC on every fd is a lost cause, just use closefrom() before exec.
This commit is contained in:
4
tmux.c
4
tmux.c
@ -1,4 +1,4 @@
|
||||
/* $Id: tmux.c,v 1.217 2010-10-24 00:31:57 tcunha Exp $ */
|
||||
/* $Id: tmux.c,v 1.218 2010-10-24 00:45:57 tcunha Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -226,6 +226,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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user