This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/10354] posix_spawn should use vfork() in more cases than presently


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]