=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- src/usr.bin/tmux/client.c 2010/06/05 16:47:11 1.41 +++ src/usr.bin/tmux/client.c 2010/06/28 22:10:42 1.42 @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.41 2010/06/05 16:47:11 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.42 2010/06/28 22:10:42 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -96,8 +96,7 @@ if (cmdflags & CMD_SENDENVIRON) client_send_environ(); - if (isatty(STDIN_FILENO)) - client_send_identify(flags); + client_send_identify(flags); return (&client_ibuf); @@ -131,6 +130,14 @@ fatal("dup failed"); imsg_compose(&client_ibuf, MSG_IDENTIFY, PROTOCOL_VERSION, -1, fd, &data, sizeof data); + + if ((fd = dup(STDOUT_FILENO)) == -1) + fatal("dup failed"); + imsg_compose(&client_ibuf, MSG_STDOUT, PROTOCOL_VERSION, -1, fd, NULL, 0); + + if ((fd = dup(STDERR_FILENO)) == -1) + fatal("dup failed"); + imsg_compose(&client_ibuf, MSG_STDERR, PROTOCOL_VERSION, -1, fd, NULL, 0); } void