diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-04-27 09:36:30 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-04-27 09:36:30 +0100 |
commit | 646bfe403e638f2a005ddfba37da0f94805d7e11 (patch) | |
tree | 8adeac23b1f3f5b1ae743193f13e0e4bc9defbf4 | |
parent | 650d38962f180d0fe547ebb79aad433b27c1dde9 (diff) |
Do not close stdout file descriptor in control mode since it will be needed for
printing the exit messages.
-rw-r--r-- | client.c | 5 | ||||
-rw-r--r-- | configure.ac | 2 |
2 files changed, 4 insertions, 3 deletions
@@ -523,7 +523,7 @@ client_write_open(void *data, size_t datalen) errno = EBADF; else { cf->fd = dup(msg->fd); - if (client_flags & CLIENT_CONTROL) + if (~client_flags & CLIENT_CONTROL) close(msg->fd); /* can only be used once */ } } @@ -678,7 +678,8 @@ client_read_open(void *data, size_t datalen) errno = EBADF; else { cf->fd = dup(msg->fd); - close(msg->fd); /* can only be used once */ + if (~client_flags & CLIENT_CONTROL) + close(msg->fd); /* can only be used once */ } } if (cf->fd == -1) { diff --git a/configure.ac b/configure.ac index 25d3881c..6a9ba594 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # configure.ac -AC_INIT([tmux], 3.1) +AC_INIT([tmux], 3.1a) AC_PREREQ([2.60]) AC_CONFIG_AUX_DIR(etc) |