*BSD News Article 34565


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!europa.eng.gtefsd.com!newsxfer.itd.umich.edu!nntp.cs.ubc.ca!cs.ubc.ca!frood.nsg.bc.ca!coatta
From: coatta@frood.nsg.bc.ca (Terry Coatta)
Newsgroups: comp.os.386bsd.bugs
Subject: Curious Serial Line Behaviour
Followup-To: comp.os.386bsd.bugs
Date: 19 Aug 1994 00:53:16 GMT
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Lines: 29
Distribution: world
Message-ID: <330vps$cu3@cs.ubc.ca>
NNTP-Posting-Host: coatta.home.cs.ubc.ca

I've been working on some expect scripts meant to automate the
process of establising ppp connections to other machines and I've
come across some behaviour of FreeBSD V1.1.5 which may be a bug
or feature... I'm not sure.

It appears that a call to open(/dev/cua01, O_RDWR) will return 
an errno of EBUSY if the modem's carrier detect is on at the
time the call is made, *regardless* of whether anyone has
/dev/cua01 open at the time.

I encountered this behaviour in attempting to start up the ppp
daemon from with an expect script.  I open /dev/cua01 inside
the script and then use expect to deal with initializing the
modem, dialing, etc.  Once a connection is established, I close
/dev/cua01 in the script and then start pppd.  However, due to
the above-noted behaviour, pppd fails due to /dev/cua01 being
busy.

At the moment I haven't been able to figure out a way around
this problem (I've tried various combinations of exec'ing
pppd then closing the device, etc. and none of them work).
Suggestions?

-- 
** Terry Coatta
** NSG Network Software Group, Inc.
** 211 Douglas Cres. Richmond B.C. V7B 1E4
** Tel: (604) 273-3404
** E-mail: coatta@nsg.bc.ca