what does 'probe process(PID_OR_NAME).clone' mean?
Roland McGrath
roland@redhat.com
Fri May 30 00:30:00 GMT 2008
> Thread dying => task_struct->pid != task_struct->tgid
>
> and
>
> Process dying => task_struct->pid == task_struct->tgid
>
> ??
No.
In Linux, process death is just the death of the last thread in the thread
group (process) to die. task_struct.pid == task_struct.tgid just means
this was the initial thread. It may have died while others still live.
This test is not part of the equation at all.
> Hmm.. I don't think the above is enough.. you may also have to check if
> task_struct->thread_group is an empty list or not.
That's called thread_group_empty(). It's not true until all other threads
have been passed to release_task(). This both has races if used here, and
does not do what you want in the face of ptrace keeping zombie threads around.
Thanks,
Roland
More information about the Systemtap
mailing list