[libvirt] [PATCH 2/2] udev: wake up the udev thread for stopping it

Marc Hartmayer mhartmay at linux.ibm.com
Wed Feb 20 10:05:46 UTC 2019


Signal the udev thread the change of `priv->threadQuit` by using the
thread condition.

Signed-off-by: Marc Hartmayer <mhartmay at linux.ibm.com>
---
 src/node_device/node_device_udev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 4dd2e9004fd7..32e762009f1c 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1805,6 +1805,7 @@ nodeStateInitializeEnumerate(void *opaque)
     ignore_value(virEventRemoveHandle(priv->watch));
     priv->watch = -1;
     priv->threadQuit = true;
+    virCondSignal(&priv->threadCond);
     virObjectUnlock(priv);
 }
 
-- 
2.17.0




More information about the libvir-list mailing list