in reply to wait & waitpid commands
In UNIX, you cannot reap your grandchildren, only your direct children. If the intermediate process (your direct child, the grandchild's parent) dies, then the grandchild is reparented to init (process ID 1) and you, as the grandparent, still have no opportunity to reap it (init will reap it automatically).
The behaviour is expected: waitpid will hang until something happens to one of its direct children. AIX 5.1 must have been buggy if it did anything else!
|
|---|