From owner-cvs-sys Sat May 6 23:32:34 1995 Return-Path: cvs-sys-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA07357 for cvs-sys-outgoing; Sat, 6 May 1995 23:32:34 -0700 Received: (from bde@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA07345 ; Sat, 6 May 1995 23:32:30 -0700 Date: Sat, 6 May 1995 23:32:30 -0700 From: Bruce Evans Message-Id: <199505070632.XAA07345@freefall.cdrom.com> To: CVS-commiters, cvs-sys Subject: cvs commit: src/sys/kern tty.c Sender: cvs-sys-owner@freebsd.org Precedence: bulk bde 95/05/06 23:32:29 Modified: sys/kern tty.c Log: Test the correct nonblocking flag in ttylclose(). IO_NDELAY is only valid in read() and write(). FNONBLOCK is valid in ioctl() and close(). The bug caused hung ptys when a process talked to itself using nonblocking i/o and exited while the slave pty had output to flush. ttywait() was called and hung. Signals didn't work because the process was exiting. `comcontrol /dev/ttyp0 drainwait 1' worked to terminate the wait. This shows that comcontrol is not limited to hardware control. It has no i386 or driver dependencies and doesn't belong in src/sbin/i386. Bruce