Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mimsy!oddjob!gargoyle!ihnp4!cuae2!killer!jfh From: jfh@killer.UUCP (The Beach Bum) Newsgroups: comp.bugs.sys5 Subject: Re: CLOCAL, or catch-22 Message-ID: <1302@killer.UUCP> Date: Fri, 7-Aug-87 17:03:31 EDT Article-I.D.: killer.1302 Posted: Fri Aug 7 17:03:31 1987 Date-Received: Wed, 12-Aug-87 07:18:09 EDT References: <325@nsta.UUCP> Organization: Big "D" Home for Wayward Hackers Lines: 29 Summary: try using O_NDELAY In article <325@nsta.UUCP>, amos@nsta.UUCP writes: > One of the optional flags of the c_cflag field of termio is CLOCAL. (see > ) It is supposed to cause the tty driver to ignore the > 'carrier detect' bit in the RS232 interface, and open the line anyway. > > However, the only way to set this flag is by a ioctl call; the ioctl > call needs a file-descriptor argument; a file-descriptor can only be > obtained by a successfull open call... there is a flag (least ways in system V there is a flag ...) in fcntl.h named O_NDELAY that causes the open to not wait, and if i remember the documentation correctly, one of the uses given is opening a port that doesn't have DSR or DCD asserted yet. i have used this approach on our p/60 and p/95, and it works on them. as they say, "your mileage may vary ..." also, i seem to remember that some of the cu(1)'s i've seen have a no-wait flag (i recall it is used for dialing out on modems since DCD wouldn't have been asserted yet. might want to try that approach. - john. -- John F. Haugh II HECI Exploration Co. Inc. UUCP: ...!ihnp4!killer!jfh 11910 Greenville Ave, Suite 600 "Don't Have an Oil Well?" Dallas, TX. 75243 " ... Then Buy One!" (214) 231-0993