From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312 Description of problem: If an application forks more than once, the processes beginning with the seconf fork and on will not show up in the ps -ef output. They do show up in the ps -efm output. Specifying ps -p $pid_num will also display the correct information. The proc filesystem DOES have the correct information for the missing processes. The following program can be used to reprod Version-Release number of selected component (if applicable): procps-2.0.7 How reproducible: Always Steps to Reproduce: 1. Compile the following program. gcc -o pid_test pid_test.c #include <stdio.h> #include <unistd.h> #include <sys/types.h> int main() { pid_t pid; pid = fork(); if(pid == 0) { sleep(10000); exit(0); } printf("Child1 pid == %d\n",pid); pid = fork(); if(pid != 0) { printf("Child2 pid == %d\n", pid); } sleep(10000); return 0; } 2. Run the program: ./pid_test 3. ps -ef | grep pid_test Actual Results: You will only see listing for two instances of pid_test. run the following command: ps -efm | grep pid_test and you will see all three processes. Expected Results: all three processes should be listed. The fork call should not prodice a light-weight process. Additional info:
This is due to the way "threads" are detected in ps. Basically it just looks for children with the exact same VMSIZE as the parent. If the child does any real work it will typically not show up like this. This is fixed in RHL 9 with then new threading model (NPTL).