给定一个具有 pid 0 和通讯“swapper/0”的任务实例,如何获取所有者 pid ?
==编辑==
这是使用 Netfilter Hook 发生的。
最佳答案
In the operating system Unix, every process except process 0 (the swapper) is created when another process executes the fork() system call. The process that invoked fork is the parent process and the newly-created process is the child process. Every process (except process 0) has one parent process, but can have many child processes.
The operating system kernel identifies each process by its process identifier. Process 0 is a special process that is created when the system boots; after forking a child process (process 1), process 0 becomes the swapper process (sometimes also known as the "idle task"). Process 1, known as init, is the ancestor of every other process in the system.
关于linux - 在交换器中执行时,Linux 内核模块中的任务所有者 pid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15010602/