mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemuProcessReconnectHelper: Don't create joinable thread
In the qemuProcessReconnectHelper() a new thread that does all the interesting work is spawned. The rationale is to not block the daemon startup process in case of unresponsive qemu. However, the thread handler is a local variable which gets lost once the control goes out of scope. Hence the thread gets leaked. We can avoid this if the thread isn't made joinable. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ea13a759f5
commit
3367c21dad
@ -3281,7 +3281,7 @@ qemuProcessReconnectHelper(virDomainObjPtr obj,
|
||||
*/
|
||||
virConnectRef(data->conn);
|
||||
|
||||
if (virThreadCreate(&thread, true, qemuProcessReconnect, data) < 0) {
|
||||
if (virThreadCreate(&thread, false, qemuProcessReconnect, data) < 0) {
|
||||
|
||||
virConnectClose(data->conn);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user