From: Chong Yidong Date: Fri, 19 Sep 2008 15:50:24 +0000 (+0000) Subject: (main): Use stdout rather than stdin to obtain the terminal (bug#427). X-Git-Tag: emacs-pretest-23.0.90~2845 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d5dabcb513f89eb4fb4b05e966806f3df9cc157c;p=emacs.git (main): Use stdout rather than stdin to obtain the terminal (bug#427). --- diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 8f0231db540..87cc9de6f51 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1429,7 +1429,7 @@ main (argc, argv) char *type = egetenv ("TERM"); char *tty_name = NULL; #ifndef WINDOWSNT - tty_name = ttyname (fileno (stdin)); + tty_name = ttyname (fileno (stdout)); #endif if (! tty_name)