Skip to main content
deleted 20 characters in body
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() ?

Thanks.

enter image description here

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() ?

Thanks.

enter image description here

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() ?

Thanks.

enter image description here

added 24 characters in body
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() (or the shell invokes setpgid() to make the child start a new process groupimmediately starts a new process group by calling setpgid() )?

Thanks.

enter image description here

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() (or the shell invokes setpgid() to make the child start a new process group )?

Thanks.

enter image description here

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() ?

Thanks.

enter image description here

added 2 characters in body
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork()fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() (or the shell invokes setpgid() to make the child start a new process group )?

Thanks.

enter image description here

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid()?

Thanks.

enter image description here

The following diagram from APUE leads me to wonder: in a process session, does the process group of the session leader contain only the session leader and no other process?

  • Any process created by fork() will inherit the same process group and session from its parent. So can the process group of the session leader fork arbitrary number of processes into its own process group?

  • For example, is a shell (when it is a session leader) the only process in its process group? If yes, is it because when the shell forks a child process, the child is initially in the same process group as the shell, but then immediately starts a new process group by calling setpgid() (or the shell invokes setpgid() to make the child start a new process group )?

Thanks.

enter image description here

added 212 characters in body
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k
Loading
Deleting thanks, adding a question to the session.
Source Link
Loading
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k
Loading