Bug 107701 - ps and top do not show no-exec children
ps and top do not show no-exec children
Status: CLOSED DUPLICATE of bug 107705
Product: Red Hat Linux
Classification: Retired
Component: procps (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-10-22 06:08 EDT by Jan Christiaan van Winkel
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 13:59:19 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Christiaan van Winkel 2003-10-22 06:08:39 EDT
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:

Steps to Reproduce:
Compile rabbit.c:

#include <stdio.h>
#include <unistd.h>
int main() {
  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
  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 08:51:25 EST

*** This bug has been marked as a duplicate of 107705 ***
Comment 2 Red Hat Bugzilla 2006-02-21 13:59:19 EST
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.