[PATCH] Fix error when judging if process has children

Roland McGrath roland at redhat.com
Tue Aug 10 01:32:44 UTC 2010


> There is a possibility to count a process with both CLONE_THREAD and
> CLONE_DETACHED flags set twice, but I'm doubt that such a combination of
> CLONE_ flags is real, since CLONE_DETACHED is officially no-op in kernel
> for a very long time.  Maybe it would be even better to drop this
> nclone_detached completely from strace.

CLONE_DETACHED is indeed obsolete.  But when it existed, CLONE_THREAD and
CLONE_DETACHED both being set was the norm.  I don't think CLONE_DETACHED
really matters to strace's logic.  CLONE_THREAD is what indicates that
exit_group syscalls and fatal signals will kill all sibling threads.
But one should double-check how nclone_detached is being used in strace.


Thanks,
Roland




More information about the Strace-devel mailing list