Page MenuHomeFreeBSD

watchdogd: Add -k kenv option to store the process ID.
Needs ReviewPublic

Authored by ray on Mon, May 25, 8:02 AM.

Details

Reviewers
glebius
imp
pjd
jmg
Summary

Storing the PID in the kernel environment provides access to it when operating
on read-only filesystems. Additionally, it prevents issues with stale PID
files left behind if watchdogd is terminated by SIGKILL.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73416
Build 70299: arc lint + arc unit

Event Timeline

ray requested review of this revision.Mon, May 25, 8:02 AM

To me this looks like a more generic problem rather than just the watchdogd's problem. Should every daemon have this feature? Or should we say that /var/run shall be mdmfs(8) on hosts with read-only root?

I added authors of the pidfile(3) to add people who definitely thought a lot on this problem.