Newsgroups: comp.unix.questions
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!ispd-newsserver!kodak!uupsi!ficc!peter
From: peter@ficc.ferranti.com (Peter da Silva)
Subject: Re: determining if DCE device is ready
Message-ID: <NVYATA1@xds13.ferranti.com>
Reply-To: peter@ficc.ferranti.com (Peter da Silva)
Organization: Xenix Support, FICC
References: <8272@alpha.cam.nist.gov> <130199@uunet.UU.NET>
Date: Wed, 24 Apr 91 22:31:24 GMT

In article <130199@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes:
> Or you can get trickier.
> Fork a child for each device you want to open. The child
> will block on the open. When the carrier comes on, the open
> will succeed. Have the child exit, which will then send a
> death of child signal to the parent. The parent will then
> open the device (in non blocking mode, just in case).

If the device on the other side (say, a modem) pays attention to DTR
this will mess up:

	child issues open		DTR raises
					Modem raises CD
	open completes
	child exits
	file descriptor closes		DTR drops
					Modem drops carrier

Oops.
-- 
Peter da Silva.  `-_-'  peter@ferranti.com
+1 713 274 5180.  'U`  "Have you hugged your wolf today?"
