mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-21 23:13:08 +08:00
Fix #266: CloseHandle close an invalid handle
This commit is contained in:
@@ -284,9 +284,9 @@ int main(int argc, const char *argv[])
|
||||
DWORD waitResult = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
|
||||
if (status == 1) {
|
||||
TerminateProcess(hProcess, -1);
|
||||
CloseHandle(hEvent);
|
||||
SAFE_CLOSE_HANDLE(hEvent);
|
||||
}
|
||||
CloseHandle(hProcess);
|
||||
SAFE_CLOSE_HANDLE(hProcess);
|
||||
Mprintf("Process [%d] is finished.\n", pid);
|
||||
if (status == 1) {
|
||||
Mprintf("结束运行.\n");
|
||||
|
||||
Reference in New Issue
Block a user