Commit d5dabcb5 authored by Chong Yidong's avatar Chong Yidong

(main): Use stdout rather than stdin to obtain the terminal (bug#427).

parent 997ec957
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment