continuing a process

Evan Martin martine at cs.washington.edu
Wed Jun 12 15:51:53 PDT 2002


On Wed, Jun 12, 2002 at 01:16:29PM -0700, Ethan Merritt wrote:
> On Wednesday 12 June 2002 11:42, 'Huge Nerd' Doug McLean wrote:
> >
> > I have a quick question.  I have user who wants to run a program even
> > when she is not logged in.  We tried the nohup command to no avail. 
> > CAn you folks suggest another way to keep the program running? 
> 
> If your shell is [t]csh  then nohup should be sufficient (and in fact is
> probably the default).

In bash, using the "disown" command should be sufficient.

> In bash it's more complicated. Here is the relevant section of 'man bash':
> 
[snip]
> 
> Ugh. Messy.  Yet one more reason not to use bash.   
> (Says this long-time tcsh user).

Eeeew.  ;)

But because y'all didn't ask for my opinion, here's the zsh way.

In your ~/.zshrc, add two options:
setopt nocheckjobs
setopt nohup

The first means "don't check if I have backgrounded jobs when exiting"
(normally, it'll say "you have backgrounded stuff" once before you
exit).  The second means "don't HUP anything when I exit".

-- 
      Evan Martin
martine at cs.washington.edu
  http://neugierig.org


More information about the Linux mailing list