--- trunk/reactos/ntoskrnl/ps/kill.c 2005-04-23 16:16:59 UTC (rev 14777)
+++ trunk/reactos/ntoskrnl/ps/kill.c 2005-04-23 16:17:27 UTC (rev 14778)
@@ -148,6 +148,11 @@
DPRINT("PiDeleteProcess(ObjectBody %x)\n", ObjectBody);
+ /* Remove it from the Active List */
+ ExAcquireFastMutex(&PspActiveProcessMutex);
+ RemoveEntryList(&Process->ProcessListEntry);
+ ExReleaseFastMutex(&PspActiveProcessMutex);
+
/* Delete the CID Handle */
if(Process->UniqueProcessId != NULL) {
@@ -411,12 +416,7 @@
DPRINT("PspExitProcess 0x%x\n", Process);
PspRunCreateProcessNotifyRoutines(Process, FALSE);
-
- /* Remove it from the Active List */
- ExAcquireFastMutex(&PspActiveProcessMutex);
- RemoveEntryList(&Process->ProcessListEntry);
- ExReleaseFastMutex(&PspActiveProcessMutex);
-
+
/* close all handles associated with our process, this needs to be done
when the last thread still runs */
ObKillProcess(Process);