in reply to waiting on a process group

The grandchild process' parent is exiting, which causes the grandchild to be inherited by the init() process, and hence, no longer in the grandparent's process group.

This "double fork" technique is even used this way on purpose in some code. ( for systems that lack setpgrp )

It's probably easier to demonstrate the process group waiting by spawning multiple children...