diff options
author | nicm <nicm> | 2017-04-20 17:49:26 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-20 17:49:26 +0000 |
commit | 87997efe8d4d6aeca561107f5449818184687240 (patch) | |
tree | f1e15a53f6b6bfbb575e3b8fc29da9a5ff8ba2b5 /tmux.c | |
parent | 51a0dbb172b5a051711213232a7a963524cf7eb5 (diff) |
Use fdforkpty() instead of our own unwrapped versions.
Diffstat (limited to 'tmux.c')
-rw-r--r-- | tmux.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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"); |