summaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2008-12-12 00:54:31 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2008-12-12 00:54:31 +0000
commit870790b5bb75e3979b661080546ad08c3768241d (patch)
tree7e25ebcecd1c18ee9032ceeadfb5a159193478c0 /src/term.c
parent4ad2fc760e39b34a398f8fc4fd661a5bc9200119 (diff)
downloademacs-870790b5bb75e3979b661080546ad08c3768241d.tar.gz
(init_tty): Move setting the terminal name before the
potential user: maybe_fatal.
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index fd1590547c1..4beb90dc014 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3402,6 +3402,9 @@ init_tty (char *name, char *terminal_type, int must_succeed)
fd = emacs_open (name, O_RDWR | O_NOCTTY, 0);
#endif /* O_IGNORE_CTTY */
+ tty->name = xstrdup (name);
+ terminal->name = xstrdup (name);
+
if (fd < 0)
maybe_fatal (must_succeed, terminal,
"Could not open file: %s",
@@ -3422,8 +3425,6 @@ init_tty (char *name, char *terminal_type, int must_succeed)
#endif
file = fdopen (fd, "w+");
- tty->name = xstrdup (name);
- terminal->name = xstrdup (name);
tty->input = file;
tty->output = file;
}