diff options
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -573,6 +573,8 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, if (tcsetattr(STDIN_FILENO, TCSANOW, &tio2) != 0) fatal("tcgetattr failed"); + closefrom(STDERR_FILENO + 1); + environ_push(env); clear_signals(1); @@ -603,8 +605,6 @@ window_pane_spawn(struct window_pane *wp, const char *cmd, const char *shell, fatal("fcntl failed"); if (fcntl(wp->fd, F_SETFL, mode|O_NONBLOCK) == -1) fatal("fcntl failed"); - if (fcntl(wp->fd, F_SETFD, FD_CLOEXEC) == -1) - fatal("fcntl failed"); wp->event = bufferevent_new(wp->fd, window_pane_read_callback, NULL, window_pane_error_callback, wp); bufferevent_enable(wp->event, EV_READ|EV_WRITE); |