mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 03:42:19 +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
@ -2802,14 +2802,7 @@ qemuProcessKillManagedPRDaemon(virDomainObjPtr vm)
|
||||
if (virPidFileForceCleanupPath(pidfile) < 0) {
|
||||
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 {
|
||||
priv->prDaemonRunning = false;
|
||||
}
|
||||
priv->prDaemonRunning = false;
|
||||
}
|
||||
virErrorRestore(&orig_err);
|
||||
}
|
||||
|
@ -223,16 +223,8 @@ void qemuExtVhostUserGPUStop(virQEMUDriverPtr driver,
|
||||
}
|
||||
|
||||
virErrorPreserveLast(&orig_err);
|
||||
if (virPidFileForceCleanupPath(pidfile) < 0) {
|
||||
if (virPidFileForceCleanupPath(pidfile) < 0)
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user