[Spice-devel] [vdagent-win PATCH 2/4] Close agent thread handle
Frediano Ziglio
fziglio at redhat.com
Fri Jul 7 05:31:10 UTC 2017
This is not needed so we can close it
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
vdservice/vdservice.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp
index e9bf1a2..3de8111 100644
--- a/vdservice/vdservice.cpp
+++ b/vdservice/vdservice.cpp
@@ -729,6 +729,8 @@ bool VDService::launch_agent()
vd_printf("CreateProcess() failed: %lu", GetLastError());
return false;
}
+ CloseHandle(_agent_proc_info.hThread);
+ _agent_proc_info.hThread = NULL;
_agent_alive = true;
return true;
}
@@ -769,7 +771,6 @@ bool VDService::kill_agent()
}
ResetEvent(_agent_stop_event);
CloseHandle(proc_handle);
- CloseHandle(_agent_proc_info.hThread);
ZeroMemory(&_agent_proc_info, sizeof(_agent_proc_info));
return ret;
}
--
2.9.4
More information about the Spice-devel
mailing list