我想检查我所拥有的pid进程是否是从内核扩展运行的。在用户空间中,这很简单:printf("Process %d is running\n", pid);printf("Process %d is not running\n", pid);printf("This shouldn't happen oO\n");
但是,在内
查看proc手册页(http://man7.org/linux/man-pages/man5/proc.5.html),可以通过查看flags值(PF_KTHREAD)来检测哪些进程是/proc/<pidflags %u (%lu before Linux 2.6.22) meanings, see the PF_* defines in