summaryrefslogtreecommitdiffstats
path: root/tmux.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-23 12:20:43 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-23 12:20:43 +0000
commitb3a724f30ced2f3be3a52fb54c6551b2b6c6de63 (patch)
treeeba69fe13464cf92fcf64cf32505e308949718b6 /tmux.c
parentd2eab39ffa42a0d5d8e796cbe3352f951f42b4f7 (diff)
parent98e7fbb2acee0238381feea5d583fc439aae08e2 (diff)
Merge branch 'obsd-master'
Conflicts: Makefile tmux.c
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tmux.c b/tmux.c
index 7a513f01..7f55f395 100644
--- a/tmux.c
+++ b/tmux.c
@@ -42,6 +42,7 @@ struct hooks *global_hooks;
struct timeval start_time;
const char *socket_path;
+int ptm_fd = -1;
static __dead void usage(void);
static char *make_label(const char *);
@@ -261,6 +262,8 @@ main(int argc, char **argv)
usage();
#ifdef __OpenBSD__
+ if (pty_open(&ptm_fd) != 0)
+ errx(1, "open(\"/dev/ptm\"");
if (pledge("stdio rpath wpath cpath flock fattr unix getpw sendfd "
"recvfd proc exec tty ps", NULL) != 0)
err(1, "pledge");