Subject: Re: com driver once again
To: Matthias Scheler <tron@colwyn.owl.de>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: port-i386
Date: 06/15/1995 13:48:17
> > The redirection is superfluous and will just cause the shell to hang
> > trying to open the device because there's no carrier.
> I still do not understand why you thinks this is the correct behavior.
> I've never seend any operating system blocking the serial devices if
> there's no carrier. Excuse me but I consider this as somehow brain dead.

While I agree that this treatment of serial devices is braindead, it has
been like that in UNIX for a long, long time; certainly ever since the
System III tty driver was (cough cough) "designed".

(Why do *I* consider it brain-dead?  The current scheme kind of makes sense
if you're trying to get the "cat" program to do something sort-of reasonable
without actually changing it (and in general, I'm favorable to that kind of
approach), but by and large, serial devices with modems attached are managed
by programs that are carefully crafted (or at least should have been) to
understand the intricacies of the serial driver:  getty, tip/cu, kermit,
etc.  While I'd give anything to have the cleanliness of a DN-11 autodialer,
that pretty much died out with the PDP-11[*], and it would be nice to see
a serial driver that coped with modern modems in a less roundabout, accidental
fashion.  Think of how much simpler dialing out would be if the programming
model was "open the device *normally*, talk to the modem, issue the
CARRIER_WAIT ioctl, do your thing."[**]  Unfortunately, the current model is
too entrenched ever to get replaced.)


[*] News flash from the current EE Times:  there's a company (Strobe Data Inc.)
selling a PDP-11/93 on an ISA card.  Now, when is 2.9BSD-Lite coming out? :-)

[**] Yeah, I see the race condition, too; in the OS I worked on many years
ago, eventcounts[***] handled that problem very nicely.

[***] A synchronization mechanism by Dave Reed and others of MIT; see their
innumerable papers in various journals dedicated to obscure OS concepts that
never see the light of day, or Apollo's DOMAIN OS, CRDS' UNOS, or DG-UX,
where eventcounts have seen various amounts of light with varying (if small)
amounts of success...