Subject: Re: com driver problems
To: None <tron@colwyn.owl.de>
From: Charles M. Hannum <mycroft@ai.mit.edu>
List: port-i386
Date: 06/12/1995 04:19:25
   Charles M. Hannum said:
   > > The problem is that the way the i386-ports is doing e.g. C-Kermit does not
   > > work because it is trying to set the serial port's speed before dialing.
   > 
   > Huh?  What, precisely, do you think it does wrong?

   If I understand you right (not sure about that) every I/O (or at least setting
   the speed) of the com driver is blocked if no carrier is detected.

I haven't the foggiest notion how you inferred that from anything I
wrote.

BSD and POSIX expect that programs which `dial out' will do the
following:

1) Open the device with the O_NONBLOCK flag.
2) Turn on CLOCAL.
3) Do whatever is necessary to establish a connection and get carrier
turned on.
4) Turn off CLOCAL.

If a program is not doing that, then I would argue that it is broken.
If there are such broken programs in our source tree, please report
them.

If you obey these semantics, and the driver is coded correctly, then
you never need `dial out' devices.  A program waiting for a `dial in'
(e.g. getty) will wait in open() for carrier, and meanwhile a program
can `dial out' by doing what I outlined above.