From: Richard M. Stallman Date: Mon, 16 Aug 2004 23:02:19 +0000 (+0000) Subject: (child_setup_tty) [SIGNALS_VIA_CHARACTERS]: X-Git-Tag: ttn-vms-21-2-B4~5264 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dfe598b54e166b5fa9803a39ad8dfff538041899;p=emacs.git (child_setup_tty) [SIGNALS_VIA_CHARACTERS]: Set VQUIT and VINTR chars to the standard ones if they are unset. [AIX]: Don't do that here. And don't force VINTR to standard when SIGNALS_VIA_CHARACTERS. --- diff --git a/src/sysdep.c b/src/sysdep.c index d5236a3f88a..7ffb2bb7db5 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -610,6 +610,15 @@ child_setup_tty (out) s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */ #endif /* HPUX */ +#ifdef SIGNALS_VIA_CHARACTERS + /* the QUIT and INTR character are used in process_send_signal + so set them here to something useful. */ + if (s.main.c_cc[VQUIT] == 0377) + s.main.c_cc[VQUIT] = '\\'&037; /* Control-\ */ + if (s.main.c_cc[VINTR] == 0377) + s.main.c_cc[VINTR] = 'C'&037; /* Control-C */ +#endif /* not SIGNALS_VIA_CHARACTERS */ + #ifdef AIX /* AIX enhanced edit loses NULs, so disable it */ #ifndef IBMR2AIX @@ -620,16 +629,10 @@ child_setup_tty (out) don't ignore break, but don't signal either, so it looks like NUL. */ s.main.c_iflag &= ~IGNBRK; s.main.c_iflag &= ~BRKINT; - /* QUIT and INTR work better as signals, so disable character forms */ - s.main.c_cc[VINTR] = 0377; -#ifdef SIGNALS_VIA_CHARACTERS - /* the QUIT and INTR character are used in process_send_signal - so set them here to something useful. */ - if (s.main.c_cc[VQUIT] == 0377) - s.main.c_cc[VQUIT] = '\\'&037; /* Control-\ */ - if (s.main.c_cc[VINTR] == 0377) - s.main.c_cc[VINTR] = 'C'&037; /* Control-C */ -#else /* no TIOCGPGRP or no TIOCGLTC or no TIOCGETC */ + /* rms: Formerly it set s.main.c_cc[VINTR] to 0377 here + unconditionally. Then a SIGNALS_VIA_CHARACTERS conditional + would force it to 0377. That looks like duplicated code. */ +#ifndef SIGNALS_VIA_CHARACTERS /* QUIT and INTR work better as signals, so disable character forms */ s.main.c_cc[VQUIT] = 0377; s.main.c_cc[VINTR] = 0377;