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 nptl/10311] clone(CLONE_VM) fails with pthread_getattr_np on i386


https://sourceware.org/bugzilla/show_bug.cgi?id=10311

--- Comment #16 from Martin Buchholz <martinrb at google dot com> ---
(In reply to Szabolcs Nagy from comment #13)
> (In reply to Martin Buchholz from comment #10)
> 
> >  *   vfork whenever possible.  Note that we cannot use posix_spawn
> >  *   ourselves because there's no reliable way to close all inherited
> >  *   file descriptors.
> 
> why is it more reliable to close fds on other systems?
> is it only linux that lacks closefrom?

closefrom is non-standard and not available on Linux.
IIRC I wrote that before the strategy of exec'ing a helper program was
implemented.

> what's wrong with using a helper executable?
> (it can be /bin/sh, so you don't need a new
> executable on the filesystem for this)
> 
> >  * Based on the above analysis, we are currently using vfork() on
> >  * Linux and posix_spawn() on other Unix systems.
> 
> why?

Historical - I implemented the vfork-based solution, targeting Linux; then
others implemented the posix_spawn-based solution for other Unix systems.

> 
> glibc posix_spawn bugs should now be fixed and the close
> on exec situation should be the same across unix systems.

We are considering moving from vfork to posix_spawn on Linux as you suggest!

-- 
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]