Article View: comp.bugs.sys5
Article #569Re: CLOCAL, or catch-22
From: Nigel Horne
Date: Mon, 10 Aug 1987 09:56
Date: Mon, 10 Aug 1987 09:56
26 lines
1683 bytes
1683 bytes
In article <325@nsta.UUCP> amos%nsta@nsc.com (Amos Shapir) writes:
> One of the optional flags of the c_cflag field of termio is CLOCAL. (see
> <termio.h>) 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.
In fact what you do is to open the tty line with O_NDELAY set.
e.g.
open ("/dev/ttya", O_RDWR | O_NDELAY);
-Nigel
--
--
Nigel Horne, Divisional Director, Root Technical Systems.
<njh@root.co.uk> G1ITH Fax: (01) 726 8158
Phone: +44 1 606 7799 Telex: 885995 ROOT G BT Gold: CQQ173
Technical Details
Message-ID:
<394@root44.co.uk>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!ukc!stc!root44!njhReferences:
<325@nsta.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!seismo!mcvax!ukc!stc!root44!njh From: njh@root.co.uk (Nigel Horne) Newsgroups: comp.bugs.sys5 Subject: Re: CLOCAL, or catch-22 Message-ID: <394@root44.co.uk> Date: Mon, 10-Aug-87 05:56:53 EDT Article-I.D.: root44.394 Posted: Mon Aug 10 05:56:53 1987 Date-Received: Wed, 12-Aug-87 05:01:34 EDT References: <325@nsta.UUCP> Reply-To: njh@root44.UUCP (Nigel Horne) Distribution: world Organization: Root Computers Ltd, London, England Lines: 26