[英]Meaning of struct pid_type in Linux kernel
我看到內核中的一個linux\\pid.h
定義了以下類型:
enum pid_type
{
PIDTYPE_PID,
PIDTYPE_TGID,
PIDTYPE_PGID,
PIDTYPE_SID,
PIDTYPE_MAX,
};
struct pid
類型在跟蹤與 PID 關聯的任務時使用它:
struct pid
{
atomic_t count;
unsigned int level;
/* lists of tasks that use this pid */
struct hlist_head tasks[PIDTYPE_MAX];
struct rcu_head rcu;
struct upid numbers[1];
};
但是每個列表指的是什么? 我的理解是PIDTYPE_PID
是指使用它作為 PID(從內核角度來看的“線程 ID”)的任務,而PIDTYPE_TGID
作為使用它作為 TGID 的任務,即線程組 ID,它表示一組共享相同用戶空間 PID 的線程,什么是PIDTYPE_PGID
和PIDTYPE_SID
?
SID = 會話 ID,PGID = 進程組 ID,如下所述: https : //www.win.tue.nl/~aeb/linux/lk/lk-10.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.