Messages in this thread | | | From | (Linus Torvalds) | Subject | Re: vfork | Date | 29 Dec 1999 11:35:23 -0800 |
| |
In article <87902fzd45.fsf@kc.net>, Mike Coleman <mkc@kc.net> wrote: >Wichert Akkerman <wakkerma@debian.org> writes: >> I started a bit on adding support for tracing clone() in strace. I have >> the basic framework in place, the only thing I need to do if I'm not >> mistaken is modify the clone flags to add CLONE_PTRACE. I haven't had >> the time to figure out how do to that yet.. > >I've been looking at this too (for a tool I'll release Real Soon Now), and >I've run across a few more things that seem to need tweaking. > >The tracer (e.g., strace) needs to be able to wait on clone and non-clone kids >at the same time, but the current __WCLONE doesn't allow this. The change to >exit.c below changes its semantics to make it wait for all kids. (I wonder if >any existing software depends on the old semantics. We could always add a new >flag instead.)
Add another flag.. Alternatively, the tracer could always do something like this with the current __WCLONE semantics:
if (wait4(..normal..) >= 0 || wait4(.. __WCLONE ..) >= 0) { ... }
In either case this is not a wart big enough to break existing behaviour (especially as the __WCLONE behaviour actually makes sense - libraries that want to wait on non-regular children _only_ want to use the current __WCLONE behaviour, which allows them to not ever catch a "normal" child by mistake..)
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |