Date: Tue, 19 Mar 1996 18:20:57 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: oleg@nnk.univers.chernovtsy.ua (Oleg N.Kolesnikov) Cc: questions@FreeBSD.ORG Subject: Re: Question Message-ID: <199603200120.SAA25545@phaeton.artisoft.com> In-Reply-To: <AB6DnJnmU8@nnk.univers.chernovtsy.ua> from "Oleg N.Kolesnikov" at Mar 19, 96 11:04:22 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> How can I get the state of DCD-bit under FreeBSD using C ? > What function should I use ? You need to look at t_state in the tty struct... man gtty and ignore the fact that it's a legacy interface, since the cross-reference to the ioctl() man page and tty(4) and ioctl(2) doesn't document the TIOCGETP/TIOCSETP (like the stty/gtty man page said it does). You are actually supposed to *not* look at this value; instead, you are supposed to extablish the port as your controlling tty, set -CLOCAL and HUPCL, and trap the SIGHUP's that will be sent to your process on on-to-off DCD transitions. Look at the "tip" and "cu" sources for details. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603200120.SAA25545>