终止后,从孩子那里获取task_struct

时间:2015-07-10 18:42:10

标签: c linux linux-kernel

终止后有没有办法让孩子的task_struct?

我需要这样的东西:

long pid = sys_clone(CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND, 0);
if (pid > 0) {
        sys_wait4(-1, NULL, __WALL, NULL);
        //Get child's task_struct and check some values from it

} else {
       //child stuff.
}

0 个答案:

没有答案