僵尸进程与孤儿进程

僵尸进程:

父进程没有wait操作,且父进程还没有结束前的结束的子进程称作僵尸进程;或有wait操作这些僵尸进程将会被清理掉。

孤儿进程:

父进程fock出子进程后,父进程推出,这些还在运行的子进程称作孤儿进程,内核会在进程推出时,扫描系统的所有进程,若进程父进程为刚刚的进程,则将进程的父进程改为init进程。

问题:

父进程没有wait操作,且父进程还没有结束前子进程结束了,若父进程结束时这些子僵尸进程怎么办?

If a parent process terminates, then its "zombie" children (if any) are adopted by init(8), which automatically performs a wait to remove the zombies.

posted @ 2012-12-28 14:47  周尚武  阅读(186)  评论(0)    收藏  举报