=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.144 retrieving revision 1.145 diff -u -r1.144 -r1.145 --- src/usr.bin/tmux/client.c 2020/05/08 14:15:11 1.144 +++ src/usr.bin/tmux/client.c 2020/05/26 08:41:47 1.145 @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.144 2020/05/08 14:15:11 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.145 2020/05/26 08:41:47 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -402,6 +402,8 @@ } else if (client_exitreason != CLIENT_EXIT_NONE) fprintf(stderr, "%s\n", client_exit_message()); setblocking(STDIN_FILENO, 1); + setblocking(STDOUT_FILENO, 1); + setblocking(STDERR_FILENO, 1); return (client_exitval); } @@ -429,6 +431,9 @@ if ((fd = dup(STDIN_FILENO)) == -1) fatal("dup failed"); proc_send(client_peer, MSG_IDENTIFY_STDIN, fd, NULL, 0); + if ((fd = dup(STDOUT_FILENO)) == -1) + fatal("dup failed"); + proc_send(client_peer, MSG_IDENTIFY_STDOUT, fd, NULL, 0); pid = getpid(); proc_send(client_peer, MSG_IDENTIFY_CLIENTPID, -1, &pid, sizeof pid);