How to connect to a disconnected process ?

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Sat Oct 13 00:23:07 AEST 1990


Technical content of this article: ``sess emacs'' is much more efficient
than ``screen emacs'' if you just want a reconnectable session, because
sess (part of pty) doesn't come with the virtual terminal baggage of
screen. The flip side of this is that pty will not, in fact, give you
the virtual terminal features of screen, so if you want to use those
features then you're out of luck. Okay, you can press 'n' now.

In article <1769 at tub.UUCP> net at tub.UUCP (Oliver Laumann) writes:
> In article <2064:Oct803:34:3790 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
> > > It takes Oliver Laumann's "screen" program and a Sun/BSD system.
> > pty only manages pseudo-terminals; it doesn't come with all the baggage
> > (Oliver would say feature) of display management.
> Considering that the purpose of "screen" is to manage displays I wonder
> why you call the display management functionality "baggage".

See? I was right. You are saying that it's a feature.

For the problem at hand, namely reconnecting to a disconnected process,
pty is much better: it handles these session management jobs without
forcing the baggage of virtual terminal management upon you as well.
It doesn't go through each character checking for terminal codes. In
fact, if you integrate pty into telnetd with the patches provided in the
pty package, your system loses absolutely nothing in efficiency. Making
interactive I/O several times slower qualifies as baggage.

For the problem of showing multiple windows on a tty, pty is not so
useful. screen was designed with the feature of virtual terminal
management. A virtual terminal program (such as screen itself) could be
wrapped around pty, but such a modular wrapper is not yet available. So
if the question were about display management, I would recommend screen
without any reservation. Windows and virtual terminals qualify as
features.

``Baggage'' and ``feature'' must be taken in context. A feature turns
into baggage when you don't want to use it.

> In addition, I wish you would stop putting words into my mouth and stop
> the "screen" bashing in this newsgroup.

C'mon, what words am I putting in your mouth? Lighten up. Nobody's been
bashing screen; it does its job quite well. But if you just want to run,
say, an emacs that you can reconnect to if the connection drops, ``sess
emacs'' is much more efficient than ``screen emacs''. On the flip side
again, screen lets you switch between terminal types, while pty doesn't
grok the first thing about termcap.

---Dan



More information about the Comp.unix.questions mailing list