From 87997efe8d4d6aeca561107f5449818184687240 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 20 Apr 2017 17:49:26 +0000 Subject: Use fdforkpty() instead of our own unwrapped versions. --- tmux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tmux.c') diff --git a/tmux.c b/tmux.c index b2768fa1..2fb57092 100644 --- a/tmux.c +++ b/tmux.c @@ -32,6 +32,7 @@ #include #include #include +#include #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"); -- cgit