mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00: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:
parent
6d6e371225
commit
225c5c4a20
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue