Use fdforkpty() instead of our own unwrapped versions.

This commit is contained in:
nicm
2017-04-20 17:49:26 +00:00
parent 51a0dbb172
commit 87997efe8d
5 changed files with 4 additions and 75 deletions

5
tmux.c
View File

@ -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");