diff lib-src/emacsclient.c @ 98244:b64f47f489ca

(main): Use stdout rather than stdin to obtain the terminal (bug#427).
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 19 Sep 2008 15:50:24 +0000
parents c3512b2085a0
children dd5392c63164
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Fri Sep 19 15:50:17 2008 +0000
+++ b/lib-src/emacsclient.c	Fri Sep 19 15:50:24 2008 +0000
@@ -1429,7 +1429,7 @@
       char *type = egetenv ("TERM");
       char *tty_name = NULL;
 #ifndef WINDOWSNT
-      tty_name = ttyname (fileno (stdin));
+      tty_name = ttyname (fileno (stdout));
 #endif
 
       if (! tty_name)