tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: login(1) vs "dialout ttys"



On 16 Nov, 2014, at 02:42 , Greg Troxel <gdt%ir.bbn.com@localhost> wrote:
> Dennis Ferguson <dennis.c.ferguson%gmail.com@localhost> writes:
> 
>> No, /dev/ttydX apparently just meant "attached to a modem" (we didn't do
>> this).  Through 4.3 BSD at least the BSD terminal driver did not have a
>> separate device for dial out.  If you wanted to use a modem for dial out
>> you would open the same device file as was used for dial in, but with a
>> O_NONBLOCK flag given to open() followed by some other magic (my memory is
>> dim) that was supposed to lock out pending opens waiting for carrier.  This
>> was very buggy and full of race conditions, so we avoided trying to share
>> modems for both dial-in and dial-out use.  The /dev/dtyXX thing may have
>> come from System V (or the System V-based SunOS) and was supposed to fix
>> the races.
> 
> Thanks for the explanation  of /dev/ttydX.  I remember using the
> dtyXX/ttyXX dual minor devices, for dialout/dialin, and it did work
> reliably.   That might have been on 2.11BSD, or it may have been more
> recent.

I was trying to figure out why our recollections are different, and
I think it might be a pdp-11 versus vax thing.  For the vax they
definitely did not have the dual minor devices; there was a persistent
soft carrier flag you could set for hardwired ports or reset for modem
ports, but just one minor number.  I'll guess this was because having
two would have prevented you from having more than 128 ports of a single
controller type, which was a theoretically workable hardware configuration
for a vax but close to science fiction for a pdp-11.

I do remember trying hard to make dial-out work with getty running on the
same port and deciding it was just not possible to guarantee that both
wouldn't end up with the port open at the same time.  The second minor
was required to make sure one or the other could always be stopped in
the open.

Dennis Ferguson

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail



Home | Main Index | Thread Index | Old Index