7/5 Is there a way to get a shell (tcsh if it matters) to "steal" a job
from another shell? Ie: I start process X (in the background) from
shell 1; then the connection through which shell 1 was opened dies,
but the shell apparently never receives a HUP and continues running,
with the process running as well; I then log in again and want to
somehow get that process in the foreground of my new shell.
\_ use screen
\_ thanks, but anything that can work post-facto?
\_ No. This is known as process migration. Some research
OSes (Amoeba, I believe, maybe Plan 9? (don't think so))
can do this, but not Vanilla Unix-Like-OS.
\_ what the fuck? this is NOT called process migration.
process migration is hard because it involves moving
process ACROSS MACHINES. he just wants to talk to the
pty the process was running on. this is an easy problem
and screen solves it. you have to be REALLY stupid to
come up with a reply like yours.
\_ So screen will talk to a process that's already been
left without a tty? What's the screen command for
that?
\_ No, it won't, but if you ran it in a screen window,
your terminal session could die and you could
reattach it later. --dbushong
\_ VMS (a non-research OS) did this 20 years ago. It's no
big deal, just something Unix never picked up.
\_ i think it would be a pretty simple hack to linux to
do this. you need to reattach to the pty side of the
tty, and you need to change the pgroup of the process.
anything else involved? i'm guessing reattaching to
ptys needs a kernel hack. or maybe the mechanism is
already there. in either case, it's a simple hack.
someone should volunteer.
\_ That's the great thing about open source. The
do-it-yourself nature. Go do it.
\_ Yourself.
\_ Everyone always says i should volunteer for stuff
--Someone
\_ I always get blamed for everything
--Everyone |