[sclug] Leave a process running after logging out?

Sapan Ganguly sapan.ganguly at gmail.com
Wed Feb 16 09:45:45 UTC 2005


Thanks guys.  I didn't know about "disown", that will probably do the
trick the next time I'm not quite paying attention :-)

Sapan




On Tue, 15 Feb 2005 20:51:05 +0000, J.Mann <jon at spinis-associates.co.uk> wrote:
> 
> > If I use Ctrl-Z the process is still killed when I log off.
> 
> The process is probably quitting because it has received a SIGHUP.
> 
> After you pause ("ctrl-z") and background ("bg") your process, use
> "disown" to prevent bash from sending it a SIGHUP when you logout.
> 
> Unfortunately, after you logout the output of the process is lost -
> although it will continue to run, until it finishes.
> 
> If you want to capture the output of a command after logout,
> you must remember to launch it using "screen" or "nohup".
> 
> Regards,
> Jon Mann.
> 
> 
> On Tue, Feb 15, 2005 at 06:39:20PM +0000, Sapan Ganguly wrote:
> > Hello, I haven't posted here for a long time.  I have a question which
> > probably has a simple answer.
> >
> > I am forever starting commands in a bash shell that take longer than I
> > expect, is there a way to background or pause a task that is already
> > in the foreground AND log off and go home (but still see the results
> > when I log on again in the morning)?  Sometimes I forget to use things
> > like 'screen', 'nohup' etc.  If I use Ctrl-Z the process is still
> > killed when I log off.
> >
> > Oh, another question, would 'nohup' stop a process being killed even
> > if I log out of my shell?
> >
> > Any ideas?
> >
> > Thanks,
> > Sapan
> > _______________________________________________
> > sclug mailing list
> > sclug at sclug.org.uk
> > http://www.sclug.org.uk/mailman/listinfo/sclug
> >
> _______________________________________________
> sclug mailing list
> sclug at sclug.org.uk
> http://www.sclug.org.uk/mailman/listinfo/sclug
>


More information about the Sclug mailing list