mdnsd
mdnsd copied to clipboard
Write pidfile on startup
It would be nice if mdnsd wrote its PID to a /var/run file, so that the daemon can be conveniently killed within an rc script.
It would appear that calling pidfile(3) somewhere near the beginning of main would be sufficient to set this up rather nicely.
pidfile(3) is not POSIX, actually non of my systems have it.
But yes, writing a pidfile would be nice, I'll get to it once I find sometime.
It's not in POSIX, no, but it appears to be in OpenBSD.
That would of course create a problem for the downstream port to FreeBSD, which is the one I'd be interested in; but my impression (not sure where from, now!) was that you were targeting OpenBSD, so guessed you might be OK with a distro-specific solution.
ha ! you're right.
Well I don't maintain the freebsd port, so that's their issue.