Shutdown the process manager before shutdown the registry.
authorHartmut Birr <osexpert@googlemail.com>
Sun, 13 Nov 2005 17:32:01 +0000 (17:32 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Sun, 13 Nov 2005 17:32:01 +0000 (17:32 +0000)
Running processes may have opened a registry handle.

svn path=/trunk/; revision=19209

reactos/ntoskrnl/ex/power.c

index 66f6bb3..2c893f9 100644 (file)
@@ -148,15 +148,16 @@ ShutdownThreadMain(PVOID Context)
                                           sizeof(PCH))]);
      }
 
+   PiShutdownProcessManager();
+   Waittime.QuadPart = (LONGLONG)-10000000; /* 1sec */
+   KeDelayExecutionThread(KernelMode, FALSE, &Waittime);
+
    CmShutdownRegistry();
    IoShutdownRegisteredFileSystems();
    IoShutdownRegisteredDevices();
 
-   PiShutdownProcessManager();
    MiShutdownMemoryManager();
 
-   Waittime.QuadPart = (LONGLONG)-10000000; /* 1sec */
-   KeDelayExecutionThread(KernelMode, FALSE, &Waittime);
 
    if (Action == ShutdownNoReboot)
      {