Red Hat Bugzilla – Bug 97047
Calls to getppid() are cached
Last modified: 2007-03-27 00:06:23 EDT
Description of problem:
Calls to getppid() are cached. If the parent pid changes, new calls to getppid() does not show this.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. fork, then let parent wait()
2. let child fork
3. child #2 calls getppid(). Returns pid of child #1, as expected.
4. child #2 exits. This will also exit the parent and set parent pid of child #2 to 1
5. child #2 calls getppid(). It still returns the same parent pid.
Old parent pid is returned from getppid() even when the parent pid has changed.
When the parent pid has changed, so should the return value from getppid()
Step 4 in Steps to Reproduce should of course be "child #1".
Very sorry for the long delay in processing this bug .
This problem is fixed in all current Red Hat perl releases .