]> git.eshelyaron.com Git - emacs.git/commitdiff
(init_tty): Move setting the terminal name before the
authorDan Nicolaescu <dann@ics.uci.edu>
Fri, 12 Dec 2008 00:54:31 +0000 (00:54 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Fri, 12 Dec 2008 00:54:31 +0000 (00:54 +0000)
potential user: maybe_fatal.

src/ChangeLog
src/term.c

index 6cf3d1610d85dfae01c3e4f802dc7dc1307eb2bf..daeca39e9bfa407fe3b4b77880dedf7bc302abee 100644 (file)
@@ -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
index fd1590547c185311f731c9b13d4e3023458c9aae..4beb90dc014fe9c28c74cca21a33acbe39674056 100644 (file)
@@ -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;
   }