mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Do not close the stdout file descriptor in control mode as it will be
needed for printing the exit messages. Fixes a bug when detaching with iTerm2.
This commit is contained in:
parent
18886cb510
commit
1574126e8a
5
client.c
5
client.c
@ -518,7 +518,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 */
|
||||
}
|
||||
}
|
||||
@ -673,7 +673,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) {
|
||||
|
Loading…
Reference in New Issue
Block a user