summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
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");