summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-04-21 09:25:07 +0100
committerThomas Adam <thomas@xteddy.org>2017-04-21 09:25:07 +0100
commit22e594fcea0c3e73660780665296e2d5d71bd745 (patch)
tree6da2d795aaa489c045da9075e7ba2f1d17383f71 /tmux.c
parent02580ac134522437bcfe8a68138787d444171d19 (diff)
parent87997efe8d4d6aeca561107f5449818184687240 (diff)
Merge branch 'obsd-master'
Conflicts: Makefile.am pty.c
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 28ec54cf..734b7631 100644
--- a/tmux.c
+++ b/tmux.c
@@ -29,6 +29,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");