Hello,
Here's a bug report I got through the Debian BTS.
----- Forwarded message from Kevin Ryde <[EMAIL PROTECTED]> -----
Subject: Bug#52517: info: pressing C-s too soon hangs terminal [PATCH]
Reply-To: Kevin Ryde <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
X-Debian-PR-Message: report 52517
X-Debian-PR-Package: info
To: [EMAIL PROTECTED]
From: Kevin Ryde <[EMAIL PROTECTED]>
Date: 12 Dec 1999 06:36:34 +1000
User-Agent: Gnus/5.08 (Gnus v5.8.0) Emacs/20.3
Package: info
Version: 4.0-2
On slink on a PC clone with this version of info recompiled, pressing
control-S while info is starting up will hang the terminal. No output
is done and it doesn't respond to any keys.
For me, info can take a half second or so to start up if it has to
read the disk to look through the info path. Impatiently pressing C-s
to start a text search leads to the hang.
To reproduce the problem, you can also add a separate delay to provide
a chance to press C-s. For example,
sleep 2; info whatever
The problem seems to be that info can't handle output stopped with
xoff when it fires up. It goes into raw mode with IXON disabled and
there's no way to re-enable output.
To unlock the terminal, output has to be reenabled from elsewhere.
There's probably some utility to do this, but stty and reset don't
seem to so instead I used this program. Run it with the terminal
device filename on the command line.
#include <fcntl.h>
#include <termios.h>
int main(int argc, char *argv[])
{
tcflow(open(argv[1],O_RDWR), TCOON);
return 0;
}
The attached patch puts a tcflow TCOON in the terminal initialization.
This is similar to what emacs src/sysdep.c does. I put in the ioctl
equivalent under HAVE_TERMIO_H, but I didn't test it since glibc has
termios.h.
cd texinfo-4.0/info
patch <terminal.c.diff
----- End forwarded message -----
--
enJoy -*/\*- don't even try to pronounce my first name
--- terminal.c.old Sun Dec 12 06:26:42 1999
+++ terminal.c Sun Dec 12 06:26:46 1999
@@ -738,9 +738,11 @@
#if defined (HAVE_TERMIOS_H)
tcsetattr (tty, TCSANOW, &ttybuff);
+ tcflow (tty, TCOON);
#else
# if defined (HAVE_TERMIO_H)
ioctl (tty, TCSETA, &ttybuff);
+ ioctl (tty, TCXONC, 1);
# endif
#endif