From owner-freebsd-hackers Mon Jul 24 11:25:23 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id LAA02674 for hackers-outgoing; Mon, 24 Jul 1995 11:25:23 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.11/8.6.6) with SMTP id LAA02658 for ; Mon, 24 Jul 1995 11:25:19 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA07558; Mon, 24 Jul 95 12:16:44 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9507241816.AA07558@cs.weber.edu> Subject: Re: dial up at > 9600 baud To: bde@zeta.org.au (Bruce Evans) Date: Mon, 24 Jul 95 12:16:43 MDT Cc: ache@astral.msk.su, bde@zeta.org.au, hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu In-Reply-To: <199507240023.KAA27013@godzilla.zeta.org.au> from "Bruce Evans" at Jul 24, 95 10:23:39 am X-Mailer: ELM [version 2.4dev PL52] Sender: hackers-owner@freebsd.org Precedence: bulk > >It's also broken because the wait for DCD on the blocking open is > >only in effect when the open count is 0. After one open as a > >non-blocking open, the reference count is one, and subsequent opens > >are not *supposed* to block. > > I disagree. POSIX requires it to block. Not blocking would cause > stupid behaviour such as `stty -f /dev/ttyd0' unblocking any getty > sleeping in open for /dev/ttyd0. Once the open has completed it is > hard to recover. No, it wouldn't do this. That's because the open in process is already past the flag check and is sleeping on the address tickled by the driver's DCD off-to-on processing. > 1.1.5 fiddles with the open count to make blocking work. There > can be any number of processes sleeping in open() and any number > of processes with it open (having opened it in nonblocking mode). This i the wrong thing to do. Probably it was done because the calling unit and non-calling unit devices were not being treated as logically seperate entities for that code. > 2.x doesn't fiddle with the open count yet, so blocking doesn't > work right if there is one or more nonblocking opens such as the > `stty -f' mentioned above. That's *gotta* be the wrong way to fix it. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.