Bug 97047 - Calls to getppid() are cached
Summary: Calls to getppid() are cached
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 9
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-09 16:56 UTC by Magnus Erixzon
Modified: 2007-03-27 04:06 UTC (History)
1 user (show)

Fixed In Version: ALL
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-12 00:56:57 UTC
Embargoed:


Attachments (Terms of Use)

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 .


Note You need to log in before you can comment on or make changes to this bug.