Xref: utzoo news.software.nn:1182 comp.unix.sysv386:1648 Path: utzoo!utstat!news-server.csri.toronto.edu!cs.utexas.edu!uunet!icom!xwkg.Icom.Com!andy From: andy@xwkg.Icom.Com (Andrew H. Marrinson) Newsgroups: news.software.nn,comp.unix.sysv386 Subject: Interactive rlogin problem with nn SOLVED (w/diff) Keywords: nn, rlogin, rlogind, urgent, oob, ISC Message-ID: Date: 30 Oct 90 00:18:01 GMT References: Sender: news@icom.icom.com (News Feed) Organization: Icom Systems, Inc. Lines: 41 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@icom.icom.com)