Asri-unix.1318 net.unix-wizards utzoo!decvax!cca!wales@UCLA-Security@sri-unix Sat Apr 24 21:10:07 1982 stty nohang bug in 4.1BSD DH/DM driver From: wales at UCLA-Security (Rich Wales) Near the end of the "dmintr" routine in dev/dh.c is the following line: tp->t_state &= ~CARR_ON; This statement should not be executed if LNOHANG is set in tp->t_local. If it is, then "stty nohang" doesn't work on DH/DM lines. The reason for this has to do with code in "ntread" and "ntwrite" (in dev/ttynew.c) which terminates I/O on a line when CARR_ON is off. If you look at the DZ driver (whose carrier logic is quite different because there are no modem-control interrupts on a DZ), you will note that it doesn't turn off CARR_ON when LNOHANG is set. I fixed this one by putting "if ((tp->t_local&LNOHANG) == 0)" before the line in question. You could probably just move the offending line into the block just above -- I didn't do this because I didn't want to risk messing up the WOPEN (wait for carrier before opening) logic. -- Rich Wales ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.