Linux Device Driver

如何知道目前process是否位於container裡面


參考資料:
1. sched.h
2. if-threads-share-the-same-pid-how-can-they-be-identified

判斷TGID(Thread Group ID)

if (task_tgid_vnr(current) != current->tgid) {
	// in container
}

TGID


返回上一頁