1

I have read that when Process A start Process B, then Process B will inherit Process A's Process Group ID.

I tested this by making bash execute the cat program, but I found out that bash and cat had two different Process Group ID, why is that?

0

The sid (session id) should be consistent.

When bash runs a command, it generally assigns the PGID to the first process. If its a pipeline, all the piped commands have the same PGID as the first process.

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.