Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!yale!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.wizards Subject: Re: Session management Message-ID: <14760:Aug2714:50:2990@kramden.acf.nyu.edu> Date: 27 Aug 90 14:50:29 GMT References: <8319:Aug2617:20:3690@kramden.acf.nyu.edu> <105387@convex.convex.com> Organization: IR Lines: 47 In article moss@cs.umass.edu writes: > An additional feature I definitely want is for the session manager to retain a > session for some user-selectable time (with a system chosen upper bound) if > the remote end drops before logout. I agree, and pty does this too! It's very nice to be able to just flip my terminal off in case of trouble, then reconnect later from anywhere. I don't know how I lived without this feature. pty doesn't implement the time limit: I was thinking of including it in the code, but it's easy enough to do manually. (Under the session, check every once in a while through sesslist. If the session is disconnected and has the same signaller at two successive checks, kill -HUP all the processes and sesskill the session.) > I lose modem connections because of noise > frequently, and it is really annoying to have to reconstruct my whole job tree > when that happens. Agreed. pty also lets you manually disconnect. This machine had to be taken down a couple of days ago, but before that I had a single shell running for a month. I just disconnected and reconnected every time, saving on shell startup time, eliminating the need for vi -r, and generally reducing angst. > (The VMS pty stuff keeps sessions around as described, and > when you relogin you get the option of connecting to your abandoned job or > creating a new one.) I source this script early in my login sequence (before aliases): $HOME/links/sesslist $HOME/links/sesslist | grep -s disconnected \ && ( echo -n 'Reconnect to session (return to ignore): '; \ set reconnect="$<"; \ if ( a"$reconnect"b != ab ) exec sess reconnect "$reconnect"; \ ) Primitive, but it gets the job done. A few minutes ago I just typed qf and popped back into this session. Once again, pty 3.001, the ultimate pseudo-terminal manager (implemented for BSD variants only at the moment), will appear soon on c.s.unix. If you're desperate, ask rsalz@bbn.com. If you're really desperate, anon ftp to the pub/ directory on 128.122.128.22. ---Dan