transferring processes under csh
Rick Ace
rta at pixar.UUCP
Fri Sep 2 04:45:49 AEST 1988
In article <5709 at cg-atla.UUCP>, duane at cg-atla.UUCP (Andrew Duane) writes:
> In article <1264 at mcgill-vision.UUCP>, mouse at mcgill-vision.UUCP (der Mouse) writes:
> > In article <1074 at imagine.PAWL.RPI.EDU>, hiebeler at pawl23.pawl.rpi.edu (David Hiebeler) writes:
> > > Does anyone know of a way to transfer processes between different
> > > incantations of csh?
> >
> > [stuff about environments, terminal types being changed,
> > signals required, etc.]
> > der Mouse
>
> From my days in college, I remember TOPS-20 (Twenex) being able
> to do just about this. There was the DETACH command that
> detached the current login session from your terminal (there
> was still a command shell running, but not logged in). From
> this same "not-login" shell, there was an ATTACH command that
> would reattach a previously detached session.
>
> Does anyone know how TOPS-20 handled the issues mentioned above?
> Most of them are non-trivial, but at least one system figured
> them out reasonably.
>
> Andrew L. Duane (JOT-7) w:(508)-658-5600 X5993 h:(603)-434-7934
TOPS-20 had a the concept of a process, similar to that of a process
under UNIX. TOPS-20 also had the notion of a "job", which is a set
of processes all sharing a common ancestor and that ancestor. In
addition to a process-private context data structure, all processes
of a job shared a common job-private data structure called the JSB.
In the JSB resided a handle on the job's "controlling terminal".
When a process chose to write to its "terminal", output was done
to the controlling terminal's handle appearing in the JSB. The
ATTACH/DETACH feature was simple (in concept) because by changing
one location in the JSB, you could redirect the terminals for all
processes in the job. A job with appropriate privilege could
manipulate certain items in another job's JSB.
Roadblocks to making ATTACH work under UNIX:
1. UNIX has no formal concept of a "job" and no per-job database.
(This is not the only approach, but it worked well for ATTACH.)
2. Determining which processes belong to which terminals is a nebulous task.
3. Processes have direct handles (file descriptors) on terminals;
they do not go indirect a job-common location. About the
closest thing to a "controlling terminal" is /dev/tty, but
that's not what you'll find at stdin/stdout/stderr.
Rick Ace
Pixar
3240 Kerner Blvd, San Rafael CA 94901
...!{sun,ucbvax}!pixar!rta
More information about the Comp.unix.wizards
mailing list