Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
98243:261b61f743f7 | 98244:b64f47f489ca |
---|---|
1427 if (tty) | 1427 if (tty) |
1428 { | 1428 { |
1429 char *type = egetenv ("TERM"); | 1429 char *type = egetenv ("TERM"); |
1430 char *tty_name = NULL; | 1430 char *tty_name = NULL; |
1431 #ifndef WINDOWSNT | 1431 #ifndef WINDOWSNT |
1432 tty_name = ttyname (fileno (stdin)); | 1432 tty_name = ttyname (fileno (stdout)); |
1433 #endif | 1433 #endif |
1434 | 1434 |
1435 if (! tty_name) | 1435 if (! tty_name) |
1436 { | 1436 { |
1437 message (TRUE, "%s: could not get terminal name\n", progname); | 1437 message (TRUE, "%s: could not get terminal name\n", progname); |