Skip to main content
added 67 characters in body; edited title
Source Link
nialv7
  • 239
  • 1
  • 2
  • 5

Why is there no easy way to list all child processes ofin a given process group?

Clearly, in order to support kill(0) efficiently, the kernel must keep track of the child processes ofin a process group. But that information is not exposed at all, in any way to the user space. To get that information, Ione would have to iterate over the entire procfs tree, and check the ppidpgid.

This is true for Linux, *BSD, etc. All *nix systems I checked have this problem. Why are they designed this way?

EDIT: Change the question so the kill(0) example makes sense.

Why is there no easy way to list all child processes of a given process?

Clearly, in order to support kill(0) efficiently, the kernel must keep track of the child processes of a process. But that information is not exposed at all, in any way to the user space. To get that information, I would have to iterate over the entire procfs tree, and check the ppid.

This is true for Linux, *BSD, etc. All *nix systems I checked have this problem. Why are they designed this way?

Why is there no easy way to list all processes in a given process group?

Clearly, in order to support kill(0) efficiently, the kernel must keep track of the processes in a process group. But that information is not exposed at all, in any way to the user space. To get that information, one would have to iterate over the entire procfs tree, and check the pgid.

This is true for Linux, *BSD, etc. All *nix systems I checked have this problem. Why are they designed this way?

EDIT: Change the question so the kill(0) example makes sense.

given process, not give process
Link
Rui F Ribeiro
  • 58.1k
  • 29
  • 157
  • 241

Why is there no easy way to list all child processes of a givegiven process?

Source Link
nialv7
  • 239
  • 1
  • 2
  • 5

Why is there no easy way to list all child processes of a give process?

Clearly, in order to support kill(0) efficiently, the kernel must keep track of the child processes of a process. But that information is not exposed at all, in any way to the user space. To get that information, I would have to iterate over the entire procfs tree, and check the ppid.

This is true for Linux, *BSD, etc. All *nix systems I checked have this problem. Why are they designed this way?