On Wed, May 22, 2013 at 8:26 AM, Michael ODonnell <
michael.odonn...@comcast.net> wrote:

>
>
> > the downside of tmp is that any process can also delete my
> > pid file (as opposed to having to be either root or the user
> > created for the program)
>
> Create a subdirectory of /tmp.  Your PID file will be safe
> in there but still get tidied up on reboot.
>
>
> Many good things to consider.

The sticky bit probably doesn't fly since it isn't "my" box.  It's just
somewhere that folks will want to install my "app".  So I shouldn't be
requiring global (effecting every /tmp user) system changes.  (I'm only
requiring an app specific user and init.d scripts.)

A subdir in /tmp can certainly have my ownership and permissions.  And I
guess they can't delete the directory because it isn't empty, but with
permissions on the parent directory, can't they move it?

Does anyone see significant issues with the approach that the daemon keeps
the PID file open, with a flock() advisory lock on it?  (Deployed and seems
to work.)

Bill
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to