non-root process and PID files
Dan Langille
dan at langille.org
Mon Oct 27 08:48:32 PST 2003
On 27 Oct 2003 at 17:39, Oliver Eikemeier wrote:
> Dan Langille wrote:
>
> > If a process starts up and does a setuid, should it be writing the
> > PID file before or after the setuid?
> >
> > Two methods exists AFAIK:
> >
> > 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.
>
> You may have problems removing the file on exit, though.
The plan was to not remove it.
--
Dan Langille : http://www.langille.org/
More information about the freebsd-hackers
mailing list