Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!uwm.edu!psuvax1!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.arch Subject: Re: Ignorance speaks loudest (was:Computers for users not programmers) Message-ID: <2983:Feb1213:30:1791@kramden.acf.nyu.edu> Date: 12 Feb 91 13:30:17 GMT References: <13252@lanl.gov> <1652@hpwala.wal.hp.com> <43615@cos.com> Organization: IR Lines: 53 In article <43615@cos.com> fetter@cos.UUCP (Bob Fetter) writes: [ reconnect under UNIX? ] acf3% telnet kramden Trying... Connected to KRAMDEN.ACF.NYU.EDU. Escape character is '^]'. SunOS UNIX (kramden) login: brnstnd Password: [ random login notices, deleted from this script ] session p1 sigler 2768 master 1380 slave 1381 session p1 disconnected Reconnect to session (return to ignore): p1 reconnect: p1 set, will reconnect after p3 drops pty: reconnecting to /dev/ttyp1 pty: successfully reconnected to /dev/ttyp1 kramden% jobs [1] + Stopped rn kramden% [ now I type ^] and disconnect ] telnet> quit Connection closed. The modem connection conveniently died while I was typing this article, so I dialed back in, logged into a different machine, made the above typescript, and then reconnected again to finish typing. Here's what my .login does to perform these dastardly deeds: sesslist sesslist | grep -s disconnected \ && ( echo -n 'Reconnect to session (return to ignore): '; \ set reconnect="$<"; \ if ( a"$reconnect"b != ab ) exec sess reconnect "$reconnect"; \ ) The pty package (which includes sess, reconnect, etc.) should work without too much angst on any BSD-based system; I'm willing to port it to any machine I can get my hands on. I just completed draft 9 of ``The Design, Implementation, and Use of a Pseudo-Terminal Manager,'' which describes the pty interface (and lots of gory BSD tty bugs) in detail, and illustrates some neat tricks (like suddenly deciding to record a talk session already in progress) that you simply can't do under most systems with reconnect facilities. The package is available via anonymous ftp from 128.122.128.22; the paper is available from me directly. ---Dan