Interactive rlogin problem with nn SOLVED (w/diff)
Andrew H. Marrinson
andy at xwkg.Icom.Com
Tue Oct 30 11:18:01 AEST 1990
Wow, I found what was happening! The problem was that when doing the
ioctl to set the terminal mode to and from raw mode nn was using TCSETAF,
which means set parameters and flush. Evidently, if this happened with
a partially complete packet still to be sent, that packet would be
flushed using the urgent pointer as described in my previous posting.
This led to the missing data.
The fix was to use TCSETAW instead. I will file a proper bug report with
context diff to nn-bugs. For those who want to fix it now, here's the
change to term.c, but note that it is not an official patch.
This bug potentially affects all Unix systems with termio, but is likely
to appear only with certain networking programs (e.g. ISC's rlogin) or
very slow communication lines.
*** term.c Mon Oct 29 17:05:08 1990
--- term.c.old Mon Oct 29 17:39:54 1990
***************
*** 670,677 ****
static int is_raw = 0;
#ifdef HAVE_TERMIO
! #define RAW_MODE_ON ioctl(0, TCSETAW, &raw_tty)
! #define RAW_MODE_OFF ioctl(0, TCSETAW, &norm_tty)
#else
#define RAW_MODE_ON ioctl(0, TIOCSETP, &raw_tty)
#define RAW_MODE_OFF ioctl(0, TIOCSETP, &norm_tty)
--- 670,677 ----
static int is_raw = 0;
#ifdef HAVE_TERMIO
! #define RAW_MODE_ON ioctl(0, TCSETAF, &raw_tty)
! #define RAW_MODE_OFF ioctl(0, TCSETAF, &norm_tty)
#else
#define RAW_MODE_ON ioctl(0, TIOCSETP, &raw_tty)
#define RAW_MODE_OFF ioctl(0, TIOCSETP, &norm_tty)
--
Andrew H. Marrinson
Icom Systems, Inc.
Wheeling, IL, USA
(andy at icom.icom.com)
More information about the Comp.unix.sysv386
mailing list