diff options
author | 2017-04-20 17:49:26 +0000 | |
---|---|---|
committer | 2017-04-20 17:49:26 +0000 | |
commit | 59538115fa28a5d3e0daaaa722a2530a34e9d39c (patch) | |
tree | 957ae4b5ff6b602c03d1a0023a4c23f627eb062b /usr.bin/tmux/tmux.c | |
parent | Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs (diff) | |
download | wireguard-openbsd-59538115fa28a5d3e0daaaa722a2530a34e9d39c.tar.xz wireguard-openbsd-59538115fa28a5d3e0daaaa722a2530a34e9d39c.zip |
Use fdforkpty() instead of our own unwrapped versions.
Diffstat (limited to 'usr.bin/tmux/tmux.c')
-rw-r--r-- | usr.bin/tmux/tmux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c index e19d871f02e..34edbca400c 100644 --- a/usr.bin/tmux/tmux.c +++ b/usr.bin/tmux/tmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.180 2017/04/19 12:44:29 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.181 2017/04/20 17:49:26 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -32,6 +32,7 @@ #include <string.h> #include <time.h> #include <unistd.h> +#include <util.h> #include "tmux.h" @@ -260,8 +261,8 @@ main(int argc, char **argv) if (shellcmd != NULL && argc != 0) usage(); - if (pty_open(&ptm_fd) != 0) - errx(1, "open(\"/dev/ptm\""); + if ((ptm_fd = getptmfd()) == -1) + err(1, "getptmfd"); if (pledge("stdio rpath wpath cpath flock fattr unix getpw sendfd " "recvfd proc exec tty ps", NULL) != 0) err(1, "pledge"); |