This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Review request for 5049299
- From: Roland McGrath <roland at redhat dot com>
- To: Martin Buchholz <martinrb at google dot com>
- Cc: libc-alpha at sourceware dot org, Andrew Haley <aph at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, core-libs-dev at openjdk dot java dot net, Markus Gutschke (顧孟勤) <markus at google dot com>
- Date: Tue, 30 Jun 2009 17:10:56 -0700 (PDT)
- Subject: Re: Review request for 5049299
- References: <4A1678DB.9010209@sun.com><1ccfd1c10906091244u14607dcesc40fc6017adc7808@mail.gmail.com><4A311337.9070706@sun.com><1ccfd1c10906111416x1b0fveb52eb9d3db56ded@mail.gmail.com><1ccfd1c10906221745u87082b0m80dd3b79b4646bdf@mail.gmail.com><4A40E7C0.5080308@redhat.com><1ccfd1c10906271035g660800a5n7de04efc6f1ce504@mail.gmail.com><20090628023345.C970A420F6@magilla.sf.frob.com><1ccfd1c10906291823p366255e5t678bcade6c5aa08@mail.gmail.com><20090630022822.2F69F420F6@magilla.sf.frob.com><1ccfd1c10906301658l6bc57155t20c3630a80d82263@mail.gmail.com>
> You write "It's all the same "clone" code in the kernel."
> and that may be true, but I'm thinking about the glibc wrappers around them.
I only made that point in response to your contrasts between "a dedicated
vfork syscall number" and "a clone call passed CLONE_VFORK | CLONE_VM |
SIGCHLD", for which the kernel's semantics are completely identical.
> In particular, it seems to me that vfork and clone(CLONE_VM|CLONE_VFORK)
> should have similar assembly wrappers around them. But the
> vfork code uses SAVE_PID/RESTORE_PID which frobs only the pid, not the tid,
> while clone used RESET_PID which frobs both the pid and tid.
> It seems to me they should share common infrastructure.
That makes sense to me, but I have not looked closely at that logic.
Thanks,
Roland