Results 1 to 4 of 4
Hello all,
Consider I am logged on a machine via SSH.
I execute a process having "&" at the end from a shell - I run the process in background.
...
- 02-19-2010 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 19
can I bring to front a process started with &
Hello all,
Consider I am logged on a machine via SSH.
I execute a process having "&" at the end from a shell - I run the process in background.
Then I log off from the machine.
I am just wondering if it is possible to bring that process to front after I log onto the machine again?
I would like to check the output of my running process.
Or is there any different approach to have a process running in background and to be able to view its output (i.e. printf)?
Thank you in advance,
Best regards
- 02-19-2010 #2
Hi,
look for a tool called GNU screen.Debian GNU/Linux -- You know you want it.
- 02-19-2010 #3
If you are in the same shell, you can use fg %{job_id} to bring a job back to the foreground. The jobs command will show you what processes are owned by your current shell and the jobid to use when bringing it back to the foreground. However, since you lose the shell after you log out, you will not be able to bring back to the foreground a job started in a previous session.
The best way to do this, I think, is with screen. Use screen to open up a session and start the script. Then disconnect. When you re-connect, you can use screen to re-attach the session. Then, using the process described above, bring back to the foreground your running script.
- 02-19-2010 #4Just Joined!
- Join Date
- Jan 2008
- Posts
- 19


Reply With Quote
