Author: hpoussin
Date: Wed Aug 9 16:46:41 2006
New Revision: 23533
URL:
http://svn.reactos.org/svn/reactos?rev=23533&view=rev
Log:
A thread may exit with a status code of 0.
Modified:
trunk/reactos/ntoskrnl/ps/query.c
trunk/reactos/ntoskrnl/ps/thread.c
Modified: trunk/reactos/ntoskrnl/ps/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=23…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c (original)
+++ trunk/reactos/ntoskrnl/ps/query.c Wed Aug 9 16:46:41 2006
@@ -921,9 +921,7 @@
_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;
Modified: trunk/reactos/ntoskrnl/ps/thread.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=2…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/thread.c (original)
+++ trunk/reactos/ntoskrnl/ps/thread.c Wed Aug 9 16:46:41 2006
@@ -239,6 +239,9 @@
/* 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;