[libvirt] [PATCH] daemon: Unlink unix sockets at daemon shutdown

Osier Yang jyang at redhat.com
Wed Jul 27 10:07:10 UTC 2011


---
 daemon/libvirtd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index 9e044e2..61f5a2d 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -1572,6 +1572,12 @@ cleanup:
     if (pid_file)
         unlink (pid_file);
 
+    if (sock_file && sock_file[0] != '@')
+        unlink(sock_file);
+
+    if (sock_file_ro && sock_file_ro[0] != '@')
+        unlink(sock_file_ro);
+
     VIR_FREE(sock_file);
     VIR_FREE(sock_file_ro);
     VIR_FREE(pid_file);
-- 
1.7.6




More information about the libvir-list mailing list