mirror of
https://github.com/reactos/reactos.git
synced 2024-07-04 19:54:58 +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
|
@ -921,9 +921,7 @@ NtQueryInformationThread(IN HANDLE ThreadHandle,
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
/* Write all the information from the ETHREAD/KTHREAD */
|
/* Write all the information from the ETHREAD/KTHREAD */
|
||||||
ThreadBasicInfo->ExitStatus = (Thread->ExitStatus == 0) ?
|
ThreadBasicInfo->ExitStatus = Thread->ExitStatus;
|
||||||
STATUS_PENDING :
|
|
||||||
Thread->ExitStatus;
|
|
||||||
ThreadBasicInfo->TebBaseAddress = (PVOID)Thread->Tcb.Teb;
|
ThreadBasicInfo->TebBaseAddress = (PVOID)Thread->Tcb.Teb;
|
||||||
ThreadBasicInfo->ClientId = Thread->Cid;
|
ThreadBasicInfo->ClientId = Thread->Cid;
|
||||||
ThreadBasicInfo->AffinityMask = Thread->Tcb.Affinity;
|
ThreadBasicInfo->AffinityMask = Thread->Tcb.Affinity;
|
||||||
|
|
|
@ -239,6 +239,9 @@ PspCreateThread(OUT PHANDLE ThreadHandle,
|
||||||
/* Initialize rundown protection */
|
/* Initialize rundown protection */
|
||||||
ExInitializeRundownProtection(&Thread->RundownProtect);
|
ExInitializeRundownProtection(&Thread->RundownProtect);
|
||||||
|
|
||||||
|
/* Initialize exit code */
|
||||||
|
Thread->ExitStatus = STATUS_PENDING;
|
||||||
|
|
||||||
/* Set the Process CID */
|
/* Set the Process CID */
|
||||||
Thread->ThreadsProcess = Process;
|
Thread->ThreadsProcess = Process;
|
||||||
Thread->Cid.UniqueProcess = Process->UniqueProcessId;
|
Thread->Cid.UniqueProcess = Process->UniqueProcessId;
|
||||||
|
|
Loading…
Reference in a new issue