Can I attach a new terminal window to a running process ?

Karl Auer kauer at biplane.com.au
Fri May 20 11:16:14 UTC 2016


On Fri, 2016-05-20 at 11:48 +0100, Ian A Taylor wrote:
> Sir/Madam
> 
> I have a user with a process running that they have lost the terminal
> window to
> 
> This process is awaiting some input, which must be typed
> dkg    22533    1 99 May 14 ?    3-15:11:42  ./exp1 -o exp1
> 
> Is there a way I can open another terminal window and attach to this
> process
> 
> It is important that the user observes the output of the original 
> process (22533 in this particular case)

http://unix.stackexchange.com/questions/31824/how-to-attach-terminal-to
-detached-process

Not sure if reptyr can help in this case. It's in the repos, so worth a
look:

https://blog.nelhage.com/2011/01/reptyr-attach-a-running-process-to-a-n
ew-terminal/

How does someone "lose a terminal window"? Usually that kills any
running processes attached to the terminal.

If they literally can't find it, but there is no reason to think the
window has actually been destroyed, try ALT-TAB in each workspace. You
never know. And check for shells in the process list, make sure you
know what each of them is. Follow the process tree (check out pstree,
it should be installed by default) to find out what process owns exp1 -
you may find the shell that ran it.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list