tobegit3hub / understand_linux_process

The open-source ebook of Understand Linux Process
MIT License
1k stars 170 forks source link

进程状态章节关于最新 Linux 源码中状态的描述 #50

Open hom opened 3 years ago

hom commented 3 years ago

在 Linux 4.14-rc3 之后的源代码中,关于 进程状态的描述添加了 P (parked)I (idle) 的状态

static const char * const task_state_array[] = {

    /* states in TASK_REPORT: */
    "R (running)",      /* 0x00 */
    "S (sleeping)",     /* 0x01 */
    "D (disk sleep)",   /* 0x02 */
    "T (stopped)",      /* 0x04 */
    "t (tracing stop)", /* 0x08 */
    "X (dead)",     /* 0x10 */
    "Z (zombie)",       /* 0x20 */
    "P (parked)",       /* 0x40 */

    /* states beyond TASK_REPORT: */
    "I (idle)",     /* 0x80 */
};