Re: task_struct's real_parent vs parent members
On Tue, Feb 28, 2012 at 03:58, Vimal wrote: > Hi Mulyadi, > > You were right. I found this code, which is called from > ptrace_attach function: > > http://lxr.free-electrons.com/source/kernel/ptrace.c#L41 Phe :) Like I said i am getting rusty :) glad to help btw :D -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: task_struct's real_parent vs parent members
Hi Mulyadi, You were right. I found this code, which is called from ptrace_attach function: http://lxr.free-electrons.com/source/kernel/ptrace.c#L41 Thanks :) On 27 February 2012 08:45, Vimal wrote: > Hi Mulyadi, > > On 26 February 2012 23:48, Mulyadi Santosa wrote: >> I am bit rusty here, but AFAIK sigchld is thrown to the process who >> ptrace another process. CMIIW >> > > sigchld's definition [1] says it's sent to the parent process when a > child terminates. > > But I do agree that the notion of a parent seems a bit ambiguous when > a process is being ptraced. > > ptrace is what I found when looking through some websites, and you may > very well be correct. But as always, it is good to confirm through > code. :) Let me try checking the ptrace functions. > > Thanks! > -- > Vimal -- Vimal ___ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: task_struct's real_parent vs parent members
Hi Mulyadi, On 26 February 2012 23:48, Mulyadi Santosa wrote: > I am bit rusty here, but AFAIK sigchld is thrown to the process who > ptrace another process. CMIIW > sigchld's definition [1] says it's sent to the parent process when a child terminates. But I do agree that the notion of a parent seems a bit ambiguous when a process is being ptraced. ptrace is what I found when looking through some websites, and you may very well be correct. But as always, it is good to confirm through code. :) Let me try checking the ptrace functions. Thanks! -- Vimal ___ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: task_struct's real_parent vs parent members
Hi Vimal... On Mon, Feb 27, 2012 at 03:40, Vimal wrote: > The documentation in sched.h:1313 says that "parent" refers to the > parent task that would receive SIGCHLD (i.e., the one that issues > wait4()). I followed the wait4() syscall to do_wait(), I still am not > able to find where the task's parent is updated. I am bit rusty here, but AFAIK sigchld is thrown to the process who ptrace another process. CMIIW -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list [email protected] http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
