Our current pidfile acquire APis (virPidFileAcquire) simply return -1
upon
failure to acquire a lock. This patch adds a parameter 'bool waitForLock'
which instructs the APIs if we want to make it block and wait for the lock
or not.
---
Based on Daniel's comments on:
https://www.redhat.com/archives/libvir-list/2014-March/msg00841.html
daemon/libvirtd.c | 2 +-
src/locking/lock_daemon.c | 4 ++--
src/util/virfile.c | 14 +++++++++-----
src/util/virfile.h | 2 +-
src/util/virlockspace.c | 6 +++---
src/util/virpidfile.c | 6 ++++--
src/util/virpidfile.h | 2 ++
7 files changed, 22 insertions(+), 14 deletions(-)