Mercurial > emacs
comparison src/term.c @ 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 | b6b22701e97c |
children | dab9cf44bf3f |
comparison
equal
deleted
inserted
replaced
100369:d07dbc338a2d | 100370:c611d83003ce |
---|---|
3400 dissociate ourselves from the controlling tty when we want to | 3400 dissociate ourselves from the controlling tty when we want to |
3401 open a frame on the same terminal. */ | 3401 open a frame on the same terminal. */ |
3402 fd = emacs_open (name, O_RDWR | O_NOCTTY, 0); | 3402 fd = emacs_open (name, O_RDWR | O_NOCTTY, 0); |
3403 #endif /* O_IGNORE_CTTY */ | 3403 #endif /* O_IGNORE_CTTY */ |
3404 | 3404 |
3405 tty->name = xstrdup (name); | |
3406 terminal->name = xstrdup (name); | |
3407 | |
3405 if (fd < 0) | 3408 if (fd < 0) |
3406 maybe_fatal (must_succeed, terminal, | 3409 maybe_fatal (must_succeed, terminal, |
3407 "Could not open file: %s", | 3410 "Could not open file: %s", |
3408 "Could not open file: %s", | 3411 "Could not open file: %s", |
3409 name); | 3412 name); |
3420 if (!ctty) | 3423 if (!ctty) |
3421 dissociate_if_controlling_tty (fd); | 3424 dissociate_if_controlling_tty (fd); |
3422 #endif | 3425 #endif |
3423 | 3426 |
3424 file = fdopen (fd, "w+"); | 3427 file = fdopen (fd, "w+"); |
3425 tty->name = xstrdup (name); | |
3426 terminal->name = xstrdup (name); | |
3427 tty->input = file; | 3428 tty->input = file; |
3428 tty->output = file; | 3429 tty->output = file; |
3429 } | 3430 } |
3430 | 3431 |
3431 tty->type = xstrdup (terminal_type); | 3432 tty->type = xstrdup (terminal_type); |