Date: Wed, 31 Mar 1999 09:40:15 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: patches for locale.h and tcsetatr.c In-Reply-To: <199903302352.XAA55012@out2.ibm.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 30 Mar 1999, Mark E. wrote: > The second patch I'm not sure about. It patches tcsetatr.c to disable a > section of code the enables/disables ctrl-c. The section of code in > question is disabled in the tcsetatr.c in Bash 1.147. Can you (or somebody else) explain why the right thing to do is to ifdef away all of this code? Here's the code fragment, once again: > /* enable or disable ^C */ > if ((__libc_tty_p->t_lflag & ISIG) && ! (termiosp->c_iflag & IGNBRK) > && (termiosp->c_iflag & BRKINT) && (termiosp->c_cc[VINTR] == > 0x03)) > __djgpp_set_ctrl_c (1); > else > __djgpp_set_ctrl_c (0); First, if (__libc_tty_p->t_lflag & ISIG) is zero, we *should* disable SIGINT and SIGQUIT, so calling "__djgpp_set_ctrl_c (0)" is the right thing in that case. As for the rest, I don't understand why IGNBRK and BRKINT are relevant to DJGPP, since termios currently only supports console devices, and those cannot have a break condition. So it seems that the special meaning of BRKINT and IGNBRK should be disabled for now. Please also note that as of v2.02, DJGPP supports user-defined INTR and QUIT keys (see the description of `__djgpp_set_sigint_key' and `__djgpp_set_sigquit_key' in libc.info). So the code in termios that handles c_cc[VINTR] should probably change somehow. Also, I miss the explanation of how is all this connected to the traceback being printed by Bash after Ctrl-C. Could you please fill in the blanks?