gpt4 book ai didi

linux - Zombie vs Defunct 进程?

转载 作者:IT王子 更新时间:2023-10-29 00:00:56 33 4
gpt4 key购买 nike

僵尸进程和死进程有区别吗?我找到了维基百科文章,其中写道这两个是相同的。在那种情况下,为什么需要为同一过程设置 2 个不同的术语:

https://en.wikipedia.org/wiki/Zombie_process

最佳答案

对于 Linux,“defunct”和“zombie”进程是一样的。

来自 man ps :

Processes marked <defunct> are dead processes (so-called "zombies") that remain because their parent has not destroyed them properly. These processes will be destroyed by init(8) if the parent process exits.

PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:
D uninterruptible sleep (usually IO)
R running or runnable (on run queue)
S interruptible sleep (waiting for an event to complete)
T stopped by job control signal
t stopped by debugger during the tracing
W paging (not valid since the 2.6.xx kernel)
X dead (should never be seen)
Z defunct ("zombie") process, terminated but not reaped by its parent

关于linux - Zombie vs Defunct 进程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47977402/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com