mirror of
https://github.com/reactos/reactos.git
synced 2026-07-01 01:36:11 +08:00
[WINSRV] Wait for the process to exit after calling NtTerminateProcess
NtTerminateProcess just queues an apc in every thread of the target process which in turn kills each thread. We need to wait so that all processes have enough time to exit before shutting down.
This commit is contained in:
@@ -796,6 +796,8 @@ UserClientShutdown(IN PCSR_PROCESS CsrProcess,
|
||||
#endif
|
||||
NtTerminateProcess(CsrProcess->ProcessHandle, 0);
|
||||
|
||||
WaitForSingleObject(CsrProcess->ProcessHandle, ShutdownSettings.ProcessTerminateTimeout);
|
||||
|
||||
/* We are done */
|
||||
CsrDereferenceProcess(CsrProcess);
|
||||
return CsrShutdownCsrProcess;
|
||||
|
||||
Reference in New Issue
Block a user