The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 07-02-2009
matrixmadhan matrixmadhan is offline Forum Advisor  
Technorati Master
  
 

Join Date: Mar 2005
Location: leaf node in B+ tree
Posts: 2,958
Quote:
by the time the parent terminates, if there are child processes already terminated and still running, init will adopt the running ones
Init will adopt only those processes for which there is no parent process that is currently alive (or a slot in the process table entry) is no more, but in your case, child has exited first and it enters zombie state for the parent to collect the status of the created child process. Since the parent process of the child is alive very much ( in sleep mode ) init cannot adopt that, and once the parent process terminates, child stats is collected and there is no need for the child process to remain as zombie and it becomes completely relieved.