mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-24 04:12:20 +00:00
qemu: Don't explicitly remove pidfile after virPidFileForceCleanupPath()
In two places where virPidFileForceCleanupPath() is called, we try to unlink() the pidfile again. This is needless because virPidFileForceCleanupPath() has done just that. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
ac21e39faa
commit
74ec3f4d7d
@ -2801,16 +2801,9 @@ qemuProcessKillManagedPRDaemon(virDomainObjPtr vm)
|
|||||||
virErrorPreserveLast(&orig_err);
|
virErrorPreserveLast(&orig_err);
|
||||||
if (virPidFileForceCleanupPath(pidfile) < 0) {
|
if (virPidFileForceCleanupPath(pidfile) < 0) {
|
||||||
VIR_WARN("Unable to kill pr-helper process");
|
VIR_WARN("Unable to kill pr-helper process");
|
||||||
} else {
|
|
||||||
if (unlink(pidfile) < 0 &&
|
|
||||||
errno != ENOENT) {
|
|
||||||
virReportSystemError(errno,
|
|
||||||
_("Unable to remove stale pidfile %s"),
|
|
||||||
pidfile);
|
|
||||||
} else {
|
} else {
|
||||||
priv->prDaemonRunning = false;
|
priv->prDaemonRunning = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
virErrorRestore(&orig_err);
|
virErrorRestore(&orig_err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,16 +223,8 @@ void qemuExtVhostUserGPUStop(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virErrorPreserveLast(&orig_err);
|
virErrorPreserveLast(&orig_err);
|
||||||
if (virPidFileForceCleanupPath(pidfile) < 0) {
|
if (virPidFileForceCleanupPath(pidfile) < 0)
|
||||||
VIR_WARN("Unable to kill vhost-user-gpu process");
|
VIR_WARN("Unable to kill vhost-user-gpu process");
|
||||||
} else {
|
|
||||||
if (unlink(pidfile) < 0 &&
|
|
||||||
errno != ENOENT) {
|
|
||||||
virReportSystemError(errno,
|
|
||||||
_("Unable to remove stale pidfile %s"),
|
|
||||||
pidfile);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
virErrorRestore(&orig_err);
|
virErrorRestore(&orig_err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user