summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authornicm <nicm>2017-04-20 17:49:26 +0000
committernicm <nicm>2017-04-20 17:49:26 +0000
commit87997efe8d4d6aeca561107f5449818184687240 (patch)
treef1e15a53f6b6bfbb575e3b8fc29da9a5ff8ba2b5 /tmux.c
parent51a0dbb172b5a051711213232a7a963524cf7eb5 (diff)
Use fdforkpty() instead of our own unwrapped versions.
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tmux.c b/tmux.c
index b2768fa1..2fb57092 100644
--- a/tmux.c
+++ b/tmux.c
@@ -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");