Yep, separate wait queue for each instance, child notifies parent, everything
is happy.
>
> Hmm... I do wonder about what happens to signals while vfork() is blocking
> the parent, though. Ick. The parent invoking signal handlers isn't much
> better then the child invoking signal handlers. One longjmp(), and
> everything gets confused. Temporarily block all signals to the parent but
> SIGKILL? Perhaps the only solution. And how does the child cleanly release
> the wait_queue in its parent if its parent may have been killed in the
> meantime?
That's a good question, do you want to temporarily block signals to the parent?
>
> Yuck, this is messy, I like the mm_struct approach better. But that won't
> let a multi-threaded app easily fork from any thread, and I really ought
> to get that working.
The patch that I sent out (it's gonna hit the list sometime) bypasses the
obvious problems of sharing VMs, by simply recognizing that in an MT app,
your VM area WILL be modified, irregardless. For ST apps, you just have
the parent go to sleep.
>
> (Again, for those who think this whole thing is silly: an implementation
> of vfork() essentially identical to what Linus is describing is the only
> fork() call available in uClinux. I care very much about having a decent
> implementation. This could crop up again in other weird architectures, so
> me might as well get it done once and for all.)
Well, I think it'll happen, my patch it out (I have a new rev in my tree which
adds the syscall to unistd and fixes the p_pptr thing to p_opptr).
I'm doing this because I'd like to see someone use the new vfork to write a better
FTP server for Linux, not to mention that Apache could benefit CGI wise.
>
> Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)
>
--Perry
-- Perry Harrington Linux rules all OSes. APSoft () email: perry@apsoft.com Think Blue. /\- 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/