Date: Mon, 24 Jul 95 12:16:43 MDT From: terry@cs.weber.edu (Terry Lambert) To: bde@zeta.org.au (Bruce Evans) Cc: ache@astral.msk.su, bde@zeta.org.au, hackers@freebsd.org, harry@hgac.com, jkh@violet.berkeley.edu Subject: Re: dial up at > 9600 baud Message-ID: <9507241816.AA07558@cs.weber.edu> In-Reply-To: <199507240023.KAA27013@godzilla.zeta.org.au> from "Bruce Evans" at Jul 24, 95 10:23:39 am
next in thread | previous in thread | raw e-mail | index | archive | help
> >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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9507241816.AA07558>