Date: Mon, 27 Oct 2003 17:39:33 +0100 From: Oliver Eikemeier <eikemeier@fillmore-labs.com> To: Dan Langille <dan@langille.org> Cc: freebsd-hackers@freebsd.org Subject: Re: non-root process and PID files Message-ID: <3F9D4A45.8070400@fillmore-labs.com> In-Reply-To: <3F9CF3F6.8307.ABC1250@localhost> References: <3F9CF3F6.8307.ABC1250@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F9D4A45.8070400>