*BSD News Article 19149


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!metro!sequoia!ultima!kralizec.zeta.org.au!kralizec.zeta.org.au!not-for-mail
From: bde@kralizec.zeta.org.au (Bruce Evans)
Newsgroups: comp.os.386bsd.questions
Subject: Re: sio - problem with login hanging up
Date: 5 Aug 1993 01:04:46 +1000
Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32bis
Lines: 27
Message-ID: <23oj6eINNht0@kralizec.zeta.org.au>
References: <1993Jul27.190228.22230@emba.uvm.edu> <CAuGp4.ALD@sugar.NeoSoft.COM> <23gj3fINNj7s@kralizec.zeta.org.au> <CB4sAz.MMI@sugar.NeoSoft.COM>
NNTP-Posting-Host: kralizec.zeta.org.au

In <CB4sAz.MMI@sugar.NeoSoft.COM> peter@NeoSoft.com (Peter da Silva) writes:

>In article <23gj3fINNj7s@kralizec.zeta.org.au> bde@kralizec.zeta.org.au (Bruce Evans) writes:
>> I'm going to make -clocal the default for dialin ports and clocal the
>> default for dialout ports.  Dialout ports will always be enabled ...

>Sounds pretty good. That should also help simplify the state machine for
>the bidirectional stuff, if I'm not too far out in how that works.

Yes.  Simplifying the state machine is an important point for me.
(It's implemented as a state machine at the moment, but cgd says that
it should be rewritten as one.)

I'm not sure how this should interacts with opening the device in
nonblocking mode.  Terry Lambert seems to want the O_NONBLOCK flag to
be mapped to the CLOCAL flag (for his version of the partial open hack
to work).  But things get very confusing if the O_NONBLOCK flag and/or
the CLOCAL flag are changed later.  The (Taylor) uucp sources show how
things should be done: open in O_NONBLOCK mode (CLOCAL doesn't matter
and can't be known or set before the open), then (usually) turn off
O_NONBLOCK and set CLOCAL as desired.  This requires the program to
watch for carrier changes and handle modem responses.  It works best if
the serial driver doesn't make any surprising conversions been flags
and doesn't behave specially when carrier is dropped just because the
device started out as "dialout".
-- 
Bruce Evans  bde@kralizec.zeta.org.au