This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10354] posix_spawn should use vfork() in more cases than presently
- From: "P at draigBrady dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 27 May 2014 22:36:13 +0000
- Subject: [Bug libc/10354] posix_spawn should use vfork() in more cases than presently
- Auto-submitted: auto-generated
- References: <bug-10354-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=10354
PÃdraig Brady <P at draigBrady dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |P at draigBrady dot com
--- Comment #7 from PÃdraig Brady <P at draigBrady dot com> ---
It's important that posix_spawn() avoids fork() where possible as that's the
whole reason for having this interface. I see that one can force using
vfork() with the POSIX_SPAWN_USEVFORK flag as mentioned in bug #378
though then you're on your own wrt safety.
So I'm wondering what specifically callers of posix_spawn() would
have to be careful to do?
* Not setup pthread_atfork() handlers
* pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); first (and enable
after)
* anything else?
Also I was wondering whether some restrictions could be lifted in
the implementation by using clone() rather than vfork().
I.E. vfork() where possible to support MMU less systems,
but then fall back to clone(..., CLONE_VM | SIGCHLD, ...);
to at least have an otherwise efficient implementation.
--
You are receiving this mail because:
You are on the CC list for the bug.