1

From APUE:

A process can set the process group ID of only itself or any of its children. Furthermore, it can’t change the process group ID of one of its children after that child has called one of the exec functions.

Why can't it "change the process group ID of one of its children after that child has called one of the exec functions"? Thanks.

1

I do not know the "official" reason but I would guess that the idea is that a process shall not have to expect that its PGID is suddenly changed.

So this is allowed after a fork so that shell pipelines can be set up but after the execve() the new binary find a certain state, and this shall be permanent (until the new binary decides to change it).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.