mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
changed ExitStatus to 1 when terminating processes
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@4155 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -6,6 +6,7 @@ Process Hacker
|
||||
for processes
|
||||
* Command line support for setting process priority and
|
||||
I/O priority
|
||||
* Improved termination of explorer.exe
|
||||
* FIXED:
|
||||
* Icon should restore the main window if it is minimized
|
||||
* System Information window crashes
|
||||
|
||||
@@ -820,7 +820,11 @@ BOOLEAN PhUiTerminateProcesses(
|
||||
Processes[i]->ProcessId
|
||||
)))
|
||||
{
|
||||
status = PhTerminateProcess(processHandle, STATUS_SUCCESS);
|
||||
// An exit status of 1 is used here for compatibility reasons:
|
||||
// 1. Both Task Manager and Process Explorer use 1.
|
||||
// 2. winlogon tries to restart explorer.exe if the exit status is not 1.
|
||||
|
||||
status = PhTerminateProcess(processHandle, 1);
|
||||
NtClose(processHandle);
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ NTSTATUS PhSvcApiControlProcess(
|
||||
case PhSvcControlProcessTerminate:
|
||||
if (NT_SUCCESS(status = PhOpenProcess(&processHandle, PROCESS_TERMINATE, processId)))
|
||||
{
|
||||
status = PhTerminateProcess(processHandle, STATUS_SUCCESS);
|
||||
status = PhTerminateProcess(processHandle, 1); // see notes in PhUiTerminateProcesses
|
||||
NtClose(processHandle);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user