steveh@hammer.UUCP (Stephen Hemminger) (12/05/83)
Index: vaxuba/dmf.c 4.2BSD (and 4.1c) Description: With the 4.2/4.1c select(2) a program should block until a state change on any one of N file descriptors. If one of these happens to be the terminal on a dmf device, then it will never wakeup on output queue draining. Repeat-By: Most noticeable in telnet. Output from remote will not finish until a character is typed. Fix: Add selwakeup() in near wakeup in dmfstart(). *** dmf.fix Mon Dec 5 08:48:33 1983 --- dmf.4.2 Fri Jul 29 07:33:35 1983 *************** *** 517,532 * water mark, wake up the sleepers. * (steve@tek) and wake up any selects */ ! if (tp->t_outq.c_cc<=TTLOWAT(tp)) { ! if(tp->t_state&TS_ASLEEP) { ! tp->t_state &= ~TS_ASLEEP; ! wakeup((caddr_t)&tp->t_outq); ! } ! if(tp->t_wsel) { ! selwakeup(tp->t_wsel, tp->t_state & TS_WCOLL); ! tp->t_wsel = 0; ! tp->t_state &= ~TS_WCOLL; ! } } --- 516,524 ----- * If there are sleepers, and output has drained below low * water mark, wake up the sleepers. */ ! if ((tp->t_state&TS_ASLEEP) && tp->t_outq.c_cc<=TTLOWAT(tp)) { ! tp->t_state &= ~TS_ASLEEP; ! wakeup((caddr_t)&tp->t_outq); }