[libvirt PATCH 3/6] leaseshelper: use virPidFileAcquirePathFull

Ján Tomko jtomko at redhat.com
Tue Mar 7 16:15:59 UTC 2023


The only caller that actually wants to wait for the lock.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/network/leaseshelper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/network/leaseshelper.c b/src/network/leaseshelper.c
index ed1bc49346..b1ce313e6a 100644
--- a/src/network/leaseshelper.c
+++ b/src/network/leaseshelper.c
@@ -159,7 +159,7 @@ main(int argc, char **argv)
     pid_file = g_strdup(RUNSTATEDIR "/leaseshelper.pid");
 
     /* Try to claim the pidfile, exiting if we can't */
-    if ((pid_file_fd = virPidFileAcquirePath(pid_file, true, getpid())) < 0) {
+    if ((pid_file_fd = virPidFileAcquirePathFull(pid_file, true, getpid())) < 0) {
         fprintf(stderr,
                 _("Unable to acquire PID file: %s\n errno=%d"),
                 pid_file, errno);
-- 
2.39.2



More information about the libvir-list mailing list