From d5dabcb513f89eb4fb4b05e966806f3df9cc157c Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Fri, 19 Sep 2008 15:50:24 +0000 Subject: [PATCH] (main): Use stdout rather than stdin to obtain the terminal (bug#427). --- lib-src/emacsclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5