Bug 97047

Summary: Calls to getppid() are cached
Product: [Retired] Red Hat Linux Reporter: Magnus Erixzon <magnus.erixzon>
Component: perlAssignee: Jason Vas Dias <jvdias>
Status: CLOSED CURRENTRELEASE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: high    
Version: 9CC: mmclagan
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: ALL Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-12 00:56:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Magnus Erixzon 2003-06-09 16:56:39 UTC
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):

perl-5.8.0-88

How reproducible:


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.
    
Actual results:

Old parent pid is returned from getppid() even when the parent pid has changed.

Expected results:

When the parent pid has changed, so should the return value from getppid()

Additional info:

Comment 1 Magnus Erixzon 2003-06-09 20:19:27 UTC
A typo..
Step 4 in Steps to Reproduce should of course be "child #1".


Comment 2 Jason Vas Dias 2005-11-12 00:56:57 UTC
Very sorry for the long delay in processing this bug .
This problem is fixed in all current Red Hat perl releases .