diff options
| author | Eli Zaretskii | 2012-11-13 16:17:18 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-13 16:17:18 +0200 |
| commit | 3c4ca7155293ffc2d04708007131bcbc882d8913 (patch) | |
| tree | 61787be8cd43b6fb3d5159852fbd186eea404de7 /src/term.c | |
| parent | 5ade42a5114255c43117065494b96d480c1e1588 (diff) | |
| parent | c708524567662c8911c5ab2695acc7bda0383705 (diff) | |
| download | emacs-3c4ca7155293ffc2d04708007131bcbc882d8913.tar.gz emacs-3c4ca7155293ffc2d04708007131bcbc882d8913.zip | |
Merge from trunk.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/term.c b/src/term.c index 74b02b0af27..578c701858f 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -133,10 +133,6 @@ enum no_color_bit | |||
| 133 | 133 | ||
| 134 | static int max_frame_cols; | 134 | static int max_frame_cols; |
| 135 | 135 | ||
| 136 | /* Non-zero if we have dropped our controlling tty and therefore | ||
| 137 | should not open a frame on stdout. */ | ||
| 138 | static int no_controlling_tty; | ||
| 139 | |||
| 140 | 136 | ||
| 141 | 137 | ||
| 142 | #ifdef HAVE_GPM | 138 | #ifdef HAVE_GPM |
| @@ -2918,36 +2914,9 @@ set_tty_hooks (struct terminal *terminal) | |||
| 2918 | static void | 2914 | static void |
| 2919 | dissociate_if_controlling_tty (int fd) | 2915 | dissociate_if_controlling_tty (int fd) |
| 2920 | { | 2916 | { |
| 2921 | #ifndef DOS_NT | ||
| 2922 | pid_t pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ | 2917 | pid_t pgid = tcgetpgrp (fd); /* If tcgetpgrp succeeds, fd is the ctty. */ |
| 2923 | if (pgid != -1) | 2918 | if (0 <= pgid) |
| 2924 | { | 2919 | setsid (); |
| 2925 | #if defined (USG5) | ||
| 2926 | setpgrp (); | ||
| 2927 | no_controlling_tty = 1; | ||
| 2928 | #elif defined (CYGWIN) | ||
| 2929 | setsid (); | ||
| 2930 | no_controlling_tty = 1; | ||
| 2931 | #else | ||
| 2932 | #ifdef TIOCNOTTY /* Try BSD ioctls. */ | ||
| 2933 | sigset_t blocked; | ||
| 2934 | sigemptyset (&blocked); | ||
| 2935 | sigaddset (&blocked, SIGTTOU); | ||
| 2936 | pthread_sigmask (SIG_BLOCK, &blocked, 0); | ||
| 2937 | fd = emacs_open (DEV_TTY, O_RDWR, 0); | ||
| 2938 | if (fd != -1 && ioctl (fd, TIOCNOTTY, 0) != -1) | ||
| 2939 | { | ||
| 2940 | no_controlling_tty = 1; | ||
| 2941 | } | ||
| 2942 | if (fd != -1) | ||
| 2943 | emacs_close (fd); | ||
| 2944 | pthread_sigmask (SIG_UNBLOCK, &blocked, 0); | ||
| 2945 | #else | ||
| 2946 | # error "Unknown system." | ||
| 2947 | #endif /* ! TIOCNOTTY */ | ||
| 2948 | #endif /* ! USG */ | ||
| 2949 | } | ||
| 2950 | #endif /* !DOS_NT */ | ||
| 2951 | } | 2920 | } |
| 2952 | 2921 | ||
| 2953 | /* Create a termcap display on the tty device with the given name and | 2922 | /* Create a termcap display on the tty device with the given name and |
| @@ -3235,7 +3204,6 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 3235 | FrameCols (tty) = FRAME_COLS (f); | 3204 | FrameCols (tty) = FRAME_COLS (f); |
| 3236 | tty->specified_window = FRAME_LINES (f); | 3205 | tty->specified_window = FRAME_LINES (f); |
| 3237 | 3206 | ||
| 3238 | FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; | ||
| 3239 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; | 3207 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; |
| 3240 | terminal->char_ins_del_ok = 1; | 3208 | terminal->char_ins_del_ok = 1; |
| 3241 | baud_rate = 19200; | 3209 | baud_rate = 19200; |