Difference between End Process and End Process Tree
Asked Answered
A

2

8

What is the difference between End process and End process Tree in Task Manager in Windows.Is End process tree will kill all the child process under parent?

Alike answered 8/3, 2018 at 6:45 Comment(2)
Windows doesn't maintain a Process tree, so any tool that claims to kill a "process tree" is telling a white lie. What it actually does is build and kill a process tree by listing all processes and linking child to parent. However, if the parent has already exited, then that branch of the tree is orphaned, and you won't be able to kill it. In contrast, an OS that maintains a process tree would graft the child branch to the grandparent as soon as the parent exits.Nolde
Windows 8+ maintains nested Job objects instead of a Process tree. Even prior to Windows 8, in which a Process can only be in a single Job, a careful design can chain Job objects in a tree. Each Job can be configured to automatically terminate its processes when closed (i.e. when the Job's owner exits, crashes, or gets terminated). With this design, if the base of the Job tree is terminated, it cascade terminates all of the branches.Nolde
B
4

End Process: will end/kill/close the current application.

End Process Tree: will end/kill/close the current application plus all related service and applications it is using.

For more details:

  1. https://forums.tomshardware.com/threads/end-process-tree-end-process.1079388/
  2. https://superuser.com/questions/794052/end-process-end-process-tree
Beefsteak answered 8/3, 2018 at 6:51 Comment(1)
It will not close all the other services and applications the process is using. Just the services and applications it has spawnedValora
T
0

Process Explorer

To get a better understanding you can use a tool like Process Explorer to see the "tree" view. Unfortunately task manager does not show child processes or expose that information (to my understanding and research). It is too bad it exposes this functionality, but leaves you blind.

Examples

Code.exe

For example if I ran "kill process tree" on the top level Code.exe it would also kill the child processes. If I ran the "kill process tree" on a lower level Code.exe the other processes above and next to it would continue to run, and if any of those are process watchers that re-spawn child processes it could potentially restart those killed processes.

Screenshot of Code.exe child processes

Discord.exe

Here's an interesting example that could have unintended consequences that you may not initially pick up on. If I killed process tree of the topmost Discord.exe it would also kill my chrome.exe processes as well. This is likely from clicking a link in Discord which then launched the browser, thus it is the parent process.

Screenshot of Discord.exe child processes

Throes answered 22/3, 2023 at 2:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.