[ale] Shell process control : Manipulating a process after having logged out and then logging in again

Stephen Cristol stephen at bee.net
Mon Apr 25 22:10:29 EDT 2005


On Apr 25, 2005, at 7:18 PM, Aditya Srinivasan wrote:
> If I start a process in the background; log out; and then log in again 
> ...
> how can I have the process direct its stdout to my terminal session ?
>
> For example ... I started a long running process .. halted it ...
> restarted it in the background ... Then I logged out and have logged in
> again. I'd like to be able to see what it is sending to stdout.

mdhirsch at gmail.com wrote:
> Are you sure it's still running?  I would expect it to die the first
> time it actually tried to print anything out and found that stdout no
> longer existed.  At the least, I'd expect it to hang forever trying to
> find a terminal.  I don't know a way to give it one.

When you log out, don't the children of the login process get killed by 
SIGHUP signals? I thought you had to use "nohup" (or have the program 
handle signals) to prevent this from happening. Do I have a provincial 
world view?

What about running the program with "nohup" and redirecting STDOUT to a 
file? Then you could "tail" the the file across logins.

S

-- 
Stephen Cristol
cristol at emory.edu



More information about the Ale mailing list