Date: Mon, 10 Nov 2003 23:19:22 -0800 From: Jos Backus <jos@catnook.com> To: freebsd-hackers@freebsd.org Subject: Re: non-root process and PID files Message-ID: <20031111071944.GA5778@lizzy.catnook.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
On Mon, Oct 27, 2003 at 10:31:18AM -0500, 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. > > Any suggestions? Why use pid files at all if you could be using a process supervisor instead? -- Jos Backus _/ _/_/_/ Sunnyvale, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ jos at catnook.com _/_/ _/_/_/ require 'std/disclaimer'
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031111071944.GA5778>