niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » shell
resuming a background program after logging off / on
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
SINNER
*nix forums Guru Wannabe


Joined: 19 Feb 2005
Posts: 184

PostPosted: Fri Feb 18, 2005 6:27 pm    Post subject: Re: resuming a background program after logging off / on Reply with quote

* Benjamin Johnson wrote in comp.unix.shell:
Quote:
Hi,

I have a particular program that runs for a long time, so i use

nohup nice longprog > t.out &

and log off. When i log back on, it's obviously no longer a job in the
shell -- is there any way to reattach a process to your current
shell/terminal so that you can use standard job control commands such as
fg? Or, rather, is it possible to fg a "parentless" process in whatever
shell you're using?

If my terminology isn't precise, the gist is: how can i get control of my
program once i've logged out and logged back in (other than killing it)?

-Ben

You can always use screen

start screen
start your task
CTL-A-D

will detatch the shell and the task continues to run.

TO reattach to the scession type
screen -Dr

--
David
I had a lease on an OEDIPUS COMPLEX back in '81 ...
Back to top
Ed Morton
*nix forums Guru


Joined: 20 Feb 2005
Posts: 1073

PostPosted: Fri Feb 18, 2005 6:18 pm    Post subject: Re: resuming a background program after logging off / on Reply with quote

Benjamin Johnson wrote:
Quote:
Hi,

I have a particular program that runs for a long time, so i use

nohup nice longprog > t.out &

and log off. When i log back on, it's obviously no longer a job in the
shell -- is there any way to reattach a process to your current
shell/terminal so that you can use standard job control commands such as
fg? Or, rather, is it possible to fg a "parentless" process in whatever
shell you're using?

If my terminology isn't precise, the gist is: how can i get control of
my program once i've logged out and logged back in (other than killing it)?

-Ben

man screen

Ed.
Back to top
Benjamin Johnson
*nix forums beginner


Joined: 18 Feb 2005
Posts: 1

PostPosted: Fri Feb 18, 2005 6:08 pm    Post subject: resuming a background program after logging off / on Reply with quote

Hi,

I have a particular program that runs for a long time, so i use

nohup nice longprog > t.out &

and log off. When i log back on, it's obviously no longer a job in the
shell -- is there any way to reattach a process to your current
shell/terminal so that you can use standard job control commands such as
fg? Or, rather, is it possible to fg a "parentless" process in whatever
shell you're using?

If my terminology isn't precise, the gist is: how can i get control of my
program once i've logged out and logged back in (other than killing it)?

-Ben
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 10:39 pm | All times are GMT
navigation Forum index » Programming » shell
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts can u solve this program :P bawen C++ 0 Mon Jul 24, 2006 6:26 pm
No new posts Need Help with Program in Perl on a Netware Server fhadzocos@gmail.com Perl 3 Fri Jul 21, 2006 1:57 pm
No new posts bind keyboard POWER button to start some program Vladi Lemurov Debian 1 Fri Jul 21, 2006 6:00 am
No new posts Recommend an email program for the debian-user-digest? DJ Hackenbruch Debian 5 Fri Jul 21, 2006 3:20 am
No new posts Filtering logging, don't log monitor station Tory M Blue Postfix 1 Thu Jul 20, 2006 6:07 pm

Loans | Loans | Remortgages | Myspace Layouts | Remortgages
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1186s ][ Queries: 20 (0.0445s) ][ GZIP on - Debug on ]