diff --git a/win32ss/user/winsrv/consrv/shutdown.c b/win32ss/user/winsrv/consrv/shutdown.c index 91e43993ba8..aec89dfb8e6 100644 --- a/win32ss/user/winsrv/consrv/shutdown.c +++ b/win32ss/user/winsrv/consrv/shutdown.c @@ -49,7 +49,7 @@ NonConsoleProcessShutdown(IN PCSR_PROCESS Process, /* Terminate this process */ #if DBG WCHAR buffer[MAX_PATH]; - if (!GetProcessImageFileNameW(Process->ProcessHandle, buffer, MAX_PATH)) + if (!GetProcessImageFileNameW(Process->ProcessHandle, buffer, ARRAYSIZE(buffer))) { DPRINT1("Terminating process %x\n", Process->ClientId.UniqueProcess); } @@ -58,7 +58,6 @@ NonConsoleProcessShutdown(IN PCSR_PROCESS Process, DPRINT1("Terminating process %x (%S)\n", Process->ClientId.UniqueProcess, buffer); } #endif - NtTerminateProcess(Process->ProcessHandle, 0); WaitForSingleObject(Process->ProcessHandle, ShutdownSettings.ProcessTerminateTimeout); } diff --git a/win32ss/user/winsrv/usersrv/shutdown.c b/win32ss/user/winsrv/usersrv/shutdown.c index 42973b4cfc6..ce9d4f97e1e 100644 --- a/win32ss/user/winsrv/usersrv/shutdown.c +++ b/win32ss/user/winsrv/usersrv/shutdown.c @@ -777,7 +777,7 @@ UserClientShutdown(IN PCSR_PROCESS CsrProcess, #if DBG { WCHAR buffer[MAX_PATH]; - if (!GetProcessImageFileNameW(CsrProcess->ProcessHandle, buffer, MAX_PATH)) + if (!GetProcessImageFileNameW(CsrProcess->ProcessHandle, buffer, ARRAYSIZE(buffer))) { DPRINT1("Terminating process %x\n", CsrProcess->ClientId.UniqueProcess); } @@ -788,7 +788,6 @@ UserClientShutdown(IN PCSR_PROCESS CsrProcess, } #endif NtTerminateProcess(CsrProcess->ProcessHandle, 0); - WaitForSingleObject(CsrProcess->ProcessHandle, ShutdownSettings.ProcessTerminateTimeout); /* We are done */