What are the relationships between processes in the Linux system?

  
                

As a Linux system administrator, in order to better manage the process, it is necessary to have a detailed understanding of the relationship between the processes. The following small series will introduce the relationship between the Linux processes, and learn together. Let's go.

Linux processes have a certain relationship with each other. For example, in the Linux process base, we see that each process has a parent process, and all processes take the init process as the root to form a tree structure. We're here to explain process groups and sessions to manage processes in a richer way.

process group

Each process belongs to a process group, and each process group can contain multiple processes. The process group will have a process group leader, and the PID of the leader process (see the Linux process basis) becomes the process group ID (PGID) to identify the process group.

The code is as follows:

$ps -o pid,pgid,ppid,comm

Copyright © Windows knowledge All Rights Reserved