Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!labrea!decwrl!nsc!nsta!amos From: amos@nsta.UUCP (Amos Shapir) Newsgroups: comp.bugs.sys5 Subject: CLOCAL, or catch-22 Message-ID: <325@nsta.UUCP> Date: Thu, 6-Aug-87 09:37:55 EDT Article-I.D.: nsta.325 Posted: Thu Aug 6 09:37:55 1987 Date-Received: Sat, 8-Aug-87 11:04:33 EDT Reply-To: amos%nsta@nsc.com (Amos Shapir) Distribution: world Organization: National Semiconductor (Israel) Ltd. Home of the 32532 Lines: 18 Summary: Unlocking a drawer with the key still inside Hdate: 11 Av 5747 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. This is needed for ports that do not have the DC wired; trying to open such a port without setting the CLOCAL bit first, will cause the open to hang forever waiting for a carrier signal. 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... The only solution if you don't have sources is to re-wire all your terminal plugs by shorting CD to DTR or something like that. -- Amos Shapir (My other cpu is a NS32532) National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel. +972 52 522261 amos%nsta@nsc.com @{hplabs,pyramid,sun,decwrl} 34 48 E / 32 10 N