Date: Wed, 11 Sep 1996 12:27:04 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: dkelly@hiwaay.net (David Kelly) Cc: hackers@freebsd.org, durham@w2xo.pgh.pa.us, perry@alpha.jpunix.com Subject: Re: pty's and slattach Message-ID: <199609110257.MAA11723@genesis.atrad.adelaide.edu.au> In-Reply-To: <XFMail.960910211424.dkelly@hiwaay.net> from "David Kelly" at Sep 10, 96 08:30:38 pm
index | next in thread | previous in thread | raw e-mail
David Kelly stands accused of saying:
>
> Studying /usr/src/sys/kern/tty_pty.c I find no mention of TIOCSCTTY. No
> wonder its not permitted. Studying /usr1/src/sbin/slattach/slattach.c we
> find:
It's probably not handled there 8) However it must be possible to make
a pty your controlling terminal. You might want to look at things like
'xdm' and 'screen' to see how they do it (if they do...).
> /* acquire the serial line as a controling terminal. */
> if (ioctl(fd, TIOCSCTTY, 0) < 0) {
> syslog(LOG_ERR,"ioctl(TIOCSCTTY): %m");
> exit_handler(1);
> }
>
> I don't know how to run gdb thru a daemon(0,0), but I'm quite sure this is
> where the error message originates and slattach quits. A bandaid approach
> would be to bypass the above in slattach. But I don't know enough about
> *why* the author of slattach.c wants to be a controlling terminal to be
> confident about skipping the ioctl().
You do this so that when the line drops (wrt. a tty) you get a HUP, so that
you don't have to poll line status in a device-specific fashion.
> Obviously lots of stuff works very well thru pty's. The most correct fix
> would be to take the amateur radio code and teach it to connect to the tun
> device directly. Or the sl devices. But for now I'd like to get this other
> stuff working thru pty.
'tun' devices are deliriously easy to talk to. If you think you can work
well with them, then do it!
> David Kelly N4HHE, dkelly@tomcat1.tbe.com (wk), dkelly@hiwaay.net (hm)
--
]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[
]] Genesis Software genesis@atrad.adelaide.edu.au [[
]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[
]] realtime instrument control (ph/fax) +61-8-267-3039 [[
]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609110257.MAA11723>
