tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pidfile_lock(3)
On Mon, Mar 21, 2016 at 02:30:43PM +0000, Roy Marples wrote:
> >
> > In fact, what you really want is just the guts of shlock(1), specifically
> > the shlock -p behavior. I can't see any reason why pidfile shouldn't just
> > do exactly what shlock -p does, except with a C rather than a shell interface.
>
> No, that's exactly what I don't want because if the program crashes the
> pidfile will persist. It will also exist with my proposal, but the
But the process won't, so the pidfile can be safely removed after the new
copy of the daemon confirms that, and you cannot race to create it because
of the semantics of link(2).
Please do not introduce a daemon just to service pidfile. And please bear
in mind that locking over NFS is both unreliably implemented and imperfect
by design.
Thor
Home |
Main Index |
Thread Index |
Old Index