On Wed, 2009-11-25 at 02:11 +0100, Henrik Nordstrom wrote: > ons 2009-11-25 klockan 09:07 +1100 skrev Robert Collins: > > On Tue, 2009-11-24 at 13:45 +0100, Henrik Nordstrom wrote: > > > tis 2009-11-24 klockan 15:06 +1100 skrev Robert Collins: > > > > > > > http://www.netbsd.org/docs/kernel/vfork.html has some interesting notes > > > > from the BSD world about this. > > > > > > vfork is fundamentally broken. > > > > Beyond the obvious (that it doesn't separate the memory out?) > > Undefined results if any of the following is used: > > - threads > - signals > - any form of output > - pretty much any other syscall than an successful execve In the 'vchild', yes. However I don't see why that would cause us problems: in the child side of the vfork we would only be calling execve / execvp - which will be fine. > > > there is other alternatives coming, getting around the virtual memory > > > issue when starting new processes. > > > > What are they called? > > Searching.. posix_spawn() and it's posix_spawnp() wrapper seems to be > the one. They use vfork (POSIX_SPAWN_USEVFORK) or fork internally. vfork has been available for longer and should be trivial to drop in as an experiment, whereas posix_spawn is still not widely available (and has precisely the same issues for us). -Rob
Attachment:
signature.asc
Description: This is a digitally signed message part