0

I am reading this post:

About pgid and ppid it indicates:

PGID

   Each process in a process group shares a process group ID (PGID), 
   which is the same as the PID of the first process in the process group. 
   This ID is used for signaling related processes.
   If a command starts just one process, its PID and PGID are the same.

PPID

   A process that creates a new process is called a parent process; 
   the new process is called a child process. The parent process ID (PPID) becomes associated 
   with the new child process when it is created. The PPID is not used for job control.

I understand the ppid and to be honest, seems it is a kind of group, the parent and the children processes, the children were created by the parent process and they are related in someway, right? Correct me if I am wrong. But seems it is correct at a first glance

But about the processes grouped by pgid

Question

  • How does Linux create/manage processes assigned through pgid?

Extra Questions

  • How does Linux decide when a command/process should create a group?
  • How does Linux decide when a command/process should be moved to an already created group? Based on what?
ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
Manuel Jordan
  • 1,414
  • 9
  • 33
  • 1
    The article is not attempting to say HOW is is done, only WHAT is done. I would advice as a user to accept that this is what is done. If you need to know HOW then look at question https://unix.stackexchange.com/questions/404054/how-is-a-process-group-id-set Beware it may raise more questions than it answers. – ctrl-alt-delor May 01 '22 at 12:06
  • Note that the article you’re reading is about z/OS, which is very different from Unix-style operating systems. (The shell concepts described in the article do apply, but bear that in mind if you read other articles on the same site.) – Stephen Kitt May 03 '22 at 16:25

0 Answers0