tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pidfile_lock(3)

On Mon 21 Mar 2016 at 19:02:10 -0400, Thor Lancelot Simon wrote:
> On Mon, Mar 21, 2016 at 04:44:40PM +0000, Roy Marples wrote:
> > 
> > foo starts as PID 10, links /var/foo and writes 10 to it.
> "As simple as possible but no simpler".  Don't just write 10, write
> hostname-proctitle-10 (this is an old solution too; trn does it).

Also, for foo it is much easier to check that process 10 is itself
(getpid(2)) than that process 10 merely exists (how? some weird exception
to how kill(2) does its work perhaps, but which is totally unintuitive).

___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/    -- 'this bath is too hot.'

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index