2011/6/4 Daniel P. Berrange <berrange@xxxxxxxxxx>: > The error code for virKillProcess is returned in the errno variable > not the return value. THis mistake caused the logs to be filled with > errors when shutting down QEMU processes > > * src/qemu/qemu_process.c: Fix process kill check. > --- > Âsrc/qemu/qemu_process.c | Â Â6 ++---- > Â1 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index 116253e..ce05133 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -2513,7 +2513,6 @@ cleanup: > Âvoid qemuProcessKill(virDomainObjPtr vm) > Â{ > Â Â int i; > - Â Âint rc; > Â Â VIR_DEBUG("vm=%s pid=%d", vm->def->name, vm->pid); > > Â Â if (!virDomainObjIsActive(vm)) { > @@ -2535,9 +2534,8 @@ void qemuProcessKill(virDomainObjPtr vm) > Â Â Â Â else > Â Â Â Â Â Â signum = 0; /* Just check for existence */ > > - Â Â Â Ârc = virKillProcess(vm->pid, signum); > - Â Â Â Âif (rc < 0) { > - Â Â Â Â Â Âif (rc != -ESRCH) { > + Â Â Â Âif (virKillProcess(vm->pid, signum) < 0) { > + Â Â Â Â Â Âif (errno != -ESRCH) { Shouldn't this be errno != ESRCH then? ACK with that minus removed. Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list