6

In Unix/Linux terminology, do child processes of a process include grandchild processes of the process?

7

No, a child process B is a process created by some other process A. Since children of B are not created by A, they are not children of A. See also the wikipedia page.

(And fortunately there is always just a single parent, so there is no chance of incest)

4

The processes are arranged in a tree, which you can display with pstree. By definition, every process except 0 (PID 1, aka. init) has a single parent. For example, in this process tree gnome-session has three children and four descendants (including the right-most nm-applet), plus one parent (as per the definition) and three ancestors (lightdm twice and then init):

init─┬─lightdm─┬─Xorg
     │         ├─lightdm─┬─gnome-session─┬─awesome
     │         │         │               ├─nm-applet───{nm-applet}
     │         │         │               ├─ssh-agent
     │         └─2*[{lightdm}]
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.