Mail Archives: djgpp-workers/1999/03/31/02:42:30
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?
- Raw text -