Background process

Vivek Khera vivek at khera.org
Fri Mar 9 15:02:54 UTC 2007


On Mar 8, 2007, at 7:14 PM, Doug Barton wrote:

> Failing that, if you need to preserve anything that is emitted from  
> the program, nohup is probably your best bet. If it isn't going to  
> spit anything out on the terminal, take a look at daemon(8), which  
> you probably will want to run with the -f option.

I can't remember needing nohup to run *anything* since the ancient  
days of the old old old /bin/sh which would kill all of your  
processes upon logout.  Modern shells do not do this.  Just redirect  
the stdin/stdout/stderr appropriately and run in bg.

The more appropriate tool, assuming the original program has no "run  
as daemon" flag is the daemon(8) program as mentioned above.



More information about the freebsd-stable mailing list