Bug 107701 - ps and top do not show no-exec children
Summary: ps and top do not show no-exec children
Keywords:
Status: CLOSED DUPLICATE of bug 107705
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: procps
Version: 9
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-22 10:08 UTC by Jan Christiaan van Winkel
Modified: 2007-04-18 16:58 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:59:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Christiaan van Winkel 2003-10-22 10:08:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
if a program fork()s but the child does not exec, ps will not show it, and add
all CPU time to the parent.  Killing the parent will then show the child in top
and ps.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
Compile rabbit.c:

#include <stdio.h>
#include <unistd.h>
 
int main() {
 
  fork();
  fork();
 
  printf("Rabbit PID=%d\n", getpid());
 
  while (1) {}
 
}

[jc@minioreo TEST]$ make rabbit
cc     rabbit.c   -o rabbit
[jc@minioreo TEST]$ ./rabbit &
[1] 12126
Rabbit PID=12128
Rabbit PID=12127
[jc@minioreo TEST]$ Rabbit PID=12129
Rabbit PID=12126
ps
  PID TTY          TIME CMD
 8991 pts/3    00:00:00 bash
12126 pts/3    00:00:02 rabbit
12130 pts/3    00:00:00 ps
[jc@minioreo TEST]$ kill 12126    # this will kill parent, not babies
[jc@minioreo TEST]$ ps
  PID TTY          TIME CMD
 8991 pts/3    00:00:00 bash
12127 pts/3    00:00:04 rabbit
12129 pts/3    00:00:02 rabbit
12131 pts/3    00:00:00 ps


top does the same thing.

Actual Results:  ps and top *incorrectly* do not show the baby-rabbits.

Expected Results:  I want to see all processes running.  If even a ps -e will
not show these ``hidden'' processes, what ps-flag would I need?

Additional info:

Comment 1 Daniel Walsh 2004-02-11 13:51:25 UTC

*** This bug has been marked as a duplicate of 107705 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:59:19 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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