insane-adding-machines / frosted

Frosted: Free POSIX OS for tiny embedded devices
GNU General Public License v2.0
213 stars 39 forks source link

[Scheduler] when child process kills its parent, it remains in zombie state #122

Closed danielinux closed 7 years ago

danielinux commented 7 years ago

When a parent terminates, the orphan process is supposed to be adopted by init.

This seems not to be the case in the following scenario:

    ============================================
              Frosted shell - aka "Fresh"         
    --------------------------------------------
                 Licensed under GPL             
    ============================================

Current pid = 6
root@frosted / # 
root@frosted / # 
root@frosted / # fresh

    ============================================
              Frosted shell - aka "Fresh"         
    --------------------------------------------
                 Licensed under GPL             
    ============================================

Current pid = 7
root@frosted / # kill 7
root@frosted / # cat /sys/tasks
pid state   stack   heap    nice    name
1   W   264 1700    0   /bin/init
6   r   960 7468    0   fresh
8   Z   192 2036    0   kill
9   R   272 2036    0   cat