[Xorp-hackers] PATCH: Remove some dead code, unlink pid-file on exit.

Ben Greear greearb at candelatech.com
Tue Oct 6 09:42:19 PDT 2009


On 10/06/2009 06:07 AM, Bruce Simpson wrote:
> Ben,
>
> A few comments about this patch:
> * Do you have a specific distribution which relies on the behaviour of
> removing the pid file after the daemon terminates?
> For the BSD distributions at least, when running XORP from an rc.subr
> init script, this shouldn't be an issue; the file is just ignored, and
> overwritten on the next run.
> It's good filesystem hygeine to remove it, though.

I have my own xorp startup logic, and having valid pid files makes things
slightly more efficient.  More of a hygiene thing though.  You can never
absolutely depend on atexit working, so you still need to check pid file
contents against /proc/[pid]/ to be certain.

Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list