non-root process and PID files

Joan Picanyol lists-freebsd-hackers at biaix.org
Thu Nov 13 03:10:18 PST 2003


* Terry Lambert <tlambert2 at mindspring.com> [20031113 11:46]:
> Jos Backus wrote:
> > On Mon, Oct 27, 2003 at 10:31:18AM -0500, Dan Langille wrote:
> > > 1 - write your PID immediately, and the file is chown root:wheel
> > > 2 - write your PID to /var/run/myapp/myapp.pid where /var/run/myapp/
> > >     is chown myapp:myapp
> > >
> > > Of the two, I think #1 is cleaner as it does not require another
> > > directory with special permissions.
> > >
> > > Any suggestions?
> > 
> > Why use pid files at all if you could be using a process supervisor instead?
> 
> Who supervises the supervisor?  Sure, you can take the English
> Bobby approach (init dies, the kernel yells "Help me, human, or
> I shall yell 'Help me Human!' again", and tries to start software
> that will never start over and over), but that solves nothing;

Let the supervisor be process 1:

http://multivac.cwru.edu/svscan-1/
http://smarden.org/runit/
http://www.fefe.de/minit/

qvb
-- 
pica


More information about the freebsd-hackers mailing list