New comment by ahesford on void-packages repository https://github.com/void-linux/void-packages/pull/30599#issuecomment-830991722 Comment: > I didn't say I thought `/proc` wasn't ugly, more that it's less ugly to use the native pid following in runit and then check the specific process details than it is to walk the entire process tree. "[J]ust as ugly" is too strong; I agree using `/proc` isn't as bad as `pgrep`. All of these are racy because no solutions guarantee that the daemon is in a usable state when the check is applied. I suppose a key question is what happens with `xenstore-write` if the necessary services aren't up. If the process just fails detectably, then drop the `check` script and the `sv check` and just monitor the return code on the `xenstore-write` invocations. Otherwise, if `xenstore-write` does unexpected things, the lock should accomplish what we need.