put running process on another console

put running process on another console

Post by T.Ruschiva » Thu, 04 Oct 2001 07:11:04



Hi,
I want put a running process on another console, is this possible ? Well I
want to explain this more detailed. This is one of the cases I want to use
this method:
At work I want to download Oracle9i (roughly 650MB one Package of three). I
dont want to download it during worktime because my fellows want to use the
Internet as well. when I go home I dont want to be logged in anymore....
because the caretaker could use my accout to do some evil things.....
well I can start a process on someone accout with the su command and I can
set the tty wher eto run this process but it is still bound to my login, if
I log out the process dies because his parent-process (my shell) is killed.
How is it possible to tell a running process to persist alhough his Parent
is killed? I am sure it works, everything I wanted to do was possible in
UNIX/Linux I just don't know how to do this.
Any Idea?
Thanks Thomas
 
 
 

put running process on another console

Post by philipp.pa.. » Thu, 04 Oct 2001 07:22:07


Quote:> set the tty wher eto run this process but it is still bound to my login, if
> I log out the process dies because his parent-process (my shell) is killed.
> How is it possible to tell a running process to persist alhough his Parent
> is killed? I am sure it works, everything I wanted to do was possible in
> UNIX/Linux I just don't know how to do this.

nohup will start the command for you and log any output in a file. As the name
suggests it will not terminate on hangup (i.e. logout).

cu
        Philipp

--
Dr. Philipp Pagel
Department of Cellular and Molecular Physiology        phone: (203) 785-6835    
Yale University                                        fax:   (203) 785-4951
New Haven, CT 06520, USA

 
 
 

put running process on another console

Post by Guillermo Labatt » Thu, 04 Oct 2001 20:29:22



>>set the tty wher eto run this process but it is still bound to my login, if
>>I log out the process dies because his parent-process (my shell) is killed.
>>How is it possible to tell a running process to persist alhough his Parent
>>is killed? I am sure it works, everything I wanted to do was possible in
>>UNIX/Linux I just don't know how to do this.

> nohup will start the command for you and log any output in a file. As the name
> suggests it will not terminate on hangup (i.e. logout).

> cu
>    Philipp

Also check out if you have 'screen' installed. Screen is an utility that
can be used to solve your problem:

1 - Log in using your account.
2 - Type 'screen'. That will start a new screen session. A screen
session looks exactly like any other shell session.
3 - Do whathever you do to start the process you need to run.
4 - Type CTRL-A D to 'detach' the screen session.
5 - Log out and go home, your process is still running.
6 - When you return you just log in using your account (not necesarily
on the same terminal)
7 - Type 'screen -r'. That will attach your screen session to the
terminal you are on. Now you have access to the results of the process.