]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Introduce functions for checking whether a pidfile is valid
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 5 Aug 2011 13:41:25 +0000 (14:41 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 12 Aug 2011 19:37:00 +0000 (20:37 +0100)
commitb7e5ca48f8c753a85ae77be3430fef83629d2178
treec2ea6422302c576f8d48a33c07e85e5ad7e68774
parentf80a4ed77a41f93a25133e9170d2b62a069cf0f5
Introduce functions for checking whether a pidfile is valid

In some cases the caller of virPidFileRead might like extra checks
to determine whether the pid just read is really the one they are
expecting. This adds virPidFileReadIfAlive which will check whether
the pid is still alive with kill(0, -1), and (on linux only) will
look at /proc/$PID/path

* libvirt_private.syms, util/virpidfile.c, util/virpidfile.h: Add
  virPidFileReadIfValid and virPidFileReadPathIfValid
* network/bridge_driver.c: Use new APIs to check PID validity
src/libvirt_private.syms
src/network/bridge_driver.c
src/util/virpidfile.c
src/util/virpidfile.h