diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-23 10:09:44 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-01-23 10:09:44 +0000 |
commit | ced88da0dc83010e18f769ef688c6a47066f388c (patch) | |
tree | 641ae7b6f3a38e3108f664a31129223eb2cb9b04 /usr.bin/tmux/client.c | |
parent | 265625d34efc350951296863b5c8e155153434f6 (diff) |
Open /dev/ptm before pledge() and save it to be used for PTMGET later
(this means inlining forkpty()).
ok deraadt
Diffstat (limited to 'usr.bin/tmux/client.c')
-rw-r--r-- | usr.bin/tmux/client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index 601f4e9c33c..bc617d545b9 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.118 2017/01/20 14:02:33 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.119 2017/01/23 10:09:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -303,6 +303,8 @@ client_main(struct event_base *base, int argc, char **argv, int flags, fatal("pledge failed"); /* Free stuff that is not used in the client. */ + if (ptm_fd != -1) + close(ptm_fd); options_free(global_options); options_free(global_s_options); options_free(global_w_options); |