[PATCH 0/5] virCommand: fix approach to pidfiles

Michal Privoznik mprivozn at redhat.com
Fri Mar 13 16:28:48 UTC 2020


This was inspired by reviewing Marc-Andre's patchset [2]. I was
wondering why the dbus-daemon is not being killed even though the
corresponding function was called. The problem is, the dbus-daemon
doesn't have the pidfile locked and therefore
virPidFileForceCleanupPath() can't be used. This got me thinking, what
is the pidfile good for if the daemon doesn't own it. Sure, we have
virPidFileReadPathIfAlive() but that won't work if the daemon binary
gets updated meanwhile.

Michal Prívozník (5):
  virCommand: Actually acquire pidfile instead of just writing it
  qemuProcessStartManagedPRDaemon: Don't pass -f pidfile to the daemon
  qemuSlirpStop: Simplify helper kill
  qemuVirtioFSStop: Simplify daemon kill
  bridge_driver: Replace and drop networkKillDaemon

 docs/internals/command.html.in |   4 +-
 src/network/bridge_driver.c    | 107 ++++++---------------------------
 src/qemu/qemu_process.c        |   9 ---
 src/qemu/qemu_slirp.c          |  16 ++---
 src/qemu/qemu_virtiofs.c       |  21 +++----
 src/util/vircommand.c          |  56 ++++++++++++++---
 tests/commanddata/test4.log    |   1 +
 7 files changed, 81 insertions(+), 133 deletions(-)

-- 
2.24.1




More information about the libvir-list mailing list