pidfile_open() usage in "mount"

Brandon Bergren bdragon at FreeBSD.org
Wed Aug 26 16:41:03 UTC 2020


> I think that a new libutil/pidfile.c function, to open only existing
> pid file, is the right approach.

The pidfile_* stuff is meant for the daemon side.

Why not just regular open(2)? If we're gonna be using the pid (as opposed to some sort of proper control socket) to figure out what to signal, it's gonna be inherently racy, and just plain opening it and reading out the pid isn't going to be better or worse than a utility call that does the same thing.


More information about the freebsd-hackers mailing list