tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rc.d and non daemon servers



On Wed, Mar 04, 2009 at 08:39:54AM -0500, matthew sporleder wrote:
> On Wed, Mar 4, 2009 at 8:29 AM, Emmanuel Dreyfus <manu%netbsd.org@localhost> 
> wrote:
> > Steven M. Bellovin <smb%cs.columbia.edu@localhost> wrote:
> >
> >> > Shall I start it with nohup /usr/local/bin/foo & ?
> >> > Or is there a nicer alternative?
> >> >
> >> I've always used &.
> >
> > But if you start it from the shell (a la /etc/rc.d/foo start), it will
> > exit when you leave your shell...
> >
> 
> I actually like the nohup option when combined with something like rotatelogs.
> (cd mydir; nohup ./foo.sh 2>&1 | rotatelogs logs/foo.out.%Y%m%d 86400 &)

nohup isn't enough, the process also needs to lose its controlling
terminal.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index