Quote:
Originally Posted by Puntino
Thank you, Why is init the parent?
|
Process A can be expected to keep track of its own children. But it has no idea how many children Process B created. If processes all must inherit grandchildren, great-grandchildren, and so on, then every process must be prepared to reap an unending number of children it knows nothing about. That's a lot to ask of every process. So we ask it only of init.
By the way, some versions of unix have a ptrace() system call intended to be only used by debuggers. Most versions of ptrace can allow a process to adopt another process and become its parent. There are restrictions on this... both processes must be owned by the same uid and the adoptee cannot be suid.