[NTOS]: List still-running processes at kernel shutdown. Useful for debugging shutdow...
authorSir Richard <sir_richard@svn.reactos.org>
Wed, 10 Mar 2010 18:29:10 +0000 (18:29 +0000)
committerSir Richard <sir_richard@svn.reactos.org>
Wed, 10 Mar 2010 18:29:10 +0000 (18:29 +0000)
svn path=/trunk/; revision=46069

reactos/ntoskrnl/po/poshtdwn.c

index 25ee2e3..dd5113e 100644 (file)
@@ -118,6 +118,23 @@ VOID
 NTAPI
 PopGracefulShutdown(IN PVOID Context)
 {
+    PEPROCESS Process = NULL;
+
+    /* Loop every process */
+    Process = PsGetNextProcess(Process);
+    while (Process)
+    {
+        /* Make sure this isn't the idle or initial process */
+        if ((Process != PsInitialSystemProcess) && (Process != PsIdleProcess))
+        {
+            /* Print it */
+            DPRINT1("%15s is still RUNNING (%lx)\n", Process->ImageFileName, Process->UniqueProcessId);
+        }
+
+        /* Get the next process */
+        Process = PsGetNextProcess(Process);
+    }
+    
     /* First, the HAL handles any "end of boot" special functionality */
     DPRINT1("HAL shutting down\n");
     HalEndOfBoot();