mirror of https://github.com/FreeRDP/FreeRDP
Setting exited flag in TerminateThread now to allow setting return code.
This commit is contained in:
parent
7ef2bd3ca0
commit
02a4d77da1
|
@ -395,7 +395,7 @@ HANDLE CreateRemoteThread(HANDLE hProcess, LPSECURITY_ATTRIBUTES lpThreadAttribu
|
|||
return NULL;
|
||||
}
|
||||
|
||||
VOID _ExitThread(DWORD dwExitCode)
|
||||
VOID ExitThread(DWORD dwExitCode)
|
||||
{
|
||||
pthread_t tid = pthread_self();
|
||||
|
||||
|
@ -518,7 +518,8 @@ BOOL TerminateThread(HANDLE hThread, DWORD dwExitCode)
|
|||
return 0;
|
||||
|
||||
thread = (WINPR_THREAD *) Object;
|
||||
thread->dwExitCode = dwExitCode;
|
||||
thread->exited = TRUE;
|
||||
thread->dwExitCode = dwExitCode;
|
||||
pthread_mutex_lock(&thread->mutex);
|
||||
#ifndef ANDROID
|
||||
pthread_cancel(thread->thread);
|
||||
|
|
Loading…
Reference in New Issue