changeset 100370:c611d83003ce

(init_tty): Move setting the terminal name before the potential user: maybe_fatal.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 12 Dec 2008 00:54:31 +0000
parents d07dbc338a2d
children 94b35290cbae
files src/ChangeLog src/term.c
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Dec 12 00:49:39 2008 +0000
+++ b/src/ChangeLog	Fri Dec 12 00:54:31 2008 +0000
@@ -1,3 +1,8 @@
+2008-12-12  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* term.c (init_tty): Move setting the terminal name before the
+	potential user: maybe_fatal.
+
 2008-12-11  Chong Yidong  <cyd@stupidchicken.com>
 
 	* term.c (tty_free_frame_resources): Renamed from
--- a/src/term.c	Fri Dec 12 00:49:39 2008 +0000
+++ b/src/term.c	Fri Dec 12 00:54:31 2008 +0000
@@ -3402,6 +3402,9 @@
       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 @@
 #endif
 
     file = fdopen (fd, "w+");
-    tty->name = xstrdup (name);
-    terminal->name = xstrdup (name);
     tty->input = file;
     tty->output = file;
   }