mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
A thread may exit with a status code of 0.
svn path=/trunk/; revision=23533
This commit is contained in:
parent
009c9838df
commit
4419e2ce2a
2 changed files with 4 additions and 3 deletions
|
@ -921,9 +921,7 @@ NtQueryInformationThread(IN HANDLE ThreadHandle,
|
|||
_SEH_TRY
|
||||
{
|
||||
/* Write all the information from the ETHREAD/KTHREAD */
|
||||
ThreadBasicInfo->ExitStatus = (Thread->ExitStatus == 0) ?
|
||||
STATUS_PENDING :
|
||||
Thread->ExitStatus;
|
||||
ThreadBasicInfo->ExitStatus = Thread->ExitStatus;
|
||||
ThreadBasicInfo->TebBaseAddress = (PVOID)Thread->Tcb.Teb;
|
||||
ThreadBasicInfo->ClientId = Thread->Cid;
|
||||
ThreadBasicInfo->AffinityMask = Thread->Tcb.Affinity;
|
||||
|
|
|
@ -239,6 +239,9 @@ PspCreateThread(OUT PHANDLE ThreadHandle,
|
|||
/* Initialize rundown protection */
|
||||
ExInitializeRundownProtection(&Thread->RundownProtect);
|
||||
|
||||
/* Initialize exit code */
|
||||
Thread->ExitStatus = STATUS_PENDING;
|
||||
|
||||
/* Set the Process CID */
|
||||
Thread->ThreadsProcess = Process;
|
||||
Thread->Cid.UniqueProcess = Process->UniqueProcessId;
|
||||
|
|
Loading…
Reference in a new issue