----- 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-Package: info
To: [EMAIL PROTECTED]
From: Kevin Ryde <[EMAIL PROTECTED]>
Date: 16 Jun 2000 07:48:30 +1000
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
Delivered-To: [EMAIL PROTECTED]
I previously submitted a patch that unblocked the terminal after
pressing C-s too soon, but it only works for a 2.0.x kernel. On 2.2.x
(2.2.13 or .15 in my case) it seems it's necessary to first do a
TCOOFF then a TCOON. I don't know if this is a kernel bug or a
feature.
The patch below is for an unmodified 4.0 info/terminal.c and can be
used instead of what I put in before.
The little program for unblocking a terminal when testing gains a
TCOOFF too,
#include <fcntl.h>
#include <termios.h>
int main(int argc, char *argv[])
{
int fd = open (argv[1], O_RDWR);
tcflow (fd, TCOOFF);
tcflow (fd, TCOON);
return 0;
}
----- End forwarded message -----
--
Digital Electronic Being Intended for Assassination and Nullification
--- terminal.c.old.old Sun Dec 12 06:26:42 1999
+++ terminal.c Sun May 14 15:26:52 2000
@@ -736,11 +736,17 @@
#endif /* VLNEXT */
#endif /* TERMIOS or TERMIO */
+ /* linux kernel 2.2.x needs a TCOFF followed by a TCOON to turn output
+ back on if the user has pressed ^S; just a TCOON doesn't work */
#if defined (HAVE_TERMIOS_H)
tcsetattr (tty, TCSANOW, &ttybuff);
+ tcflow (tty, TCOOFF);
+ tcflow (tty, TCOON);
#else
# if defined (HAVE_TERMIO_H)
ioctl (tty, TCSETA, &ttybuff);
+ ioctl (tty, TCXONC, 0);
+ ioctl (tty, TCXONC, 1);
# endif
#endif