diff options
| author | 2017-01-23 10:09:43 +0000 | |
|---|---|---|
| committer | 2017-01-23 10:09:43 +0000 | |
| commit | b6ec3d9f760fdd32867a62fe96cf8f207cf15eb8 (patch) | |
| tree | 42161e73feb1dca4ce955c8f2678b01b22442cb5 /usr.bin/tmux/window.c | |
| parent | check EAGAIN in the correct place, (diff) | |
| download | wireguard-openbsd-b6ec3d9f760fdd32867a62fe96cf8f207cf15eb8.tar.xz wireguard-openbsd-b6ec3d9f760fdd32867a62fe96cf8f207cf15eb8.zip | |
Open /dev/ptm before pledge() and save it to be used for PTMGET later
(this means inlining forkpty()).
ok deraadt
Diffstat (limited to 'usr.bin/tmux/window.c')
| -rw-r--r-- | usr.bin/tmux/window.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c index a72c95fd4ba..46b1b4b9ff2 100644 --- a/usr.bin/tmux/window.c +++ b/usr.bin/tmux/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.180 2017/01/12 10:15:55 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.181 2017/01/23 10:09:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -886,7 +886,7 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv, ws.ws_col = screen_size_x(&wp->base); ws.ws_row = screen_size_y(&wp->base); - switch (wp->pid = forkpty(&wp->fd, wp->tty, NULL, &ws)) { + switch (wp->pid = pty_fork(ptm_fd, &wp->fd, wp->tty, sizeof wp->tty, &ws)) { case -1: wp->fd = -1; xasprintf(cause, "%s: %s", cmd, strerror(errno)); |
