Web lists-archives.com

Re: [PATCH 5/5] run-command: add note about forking and threading




Brandon Williams <bmwill@xxxxxxxxxx> wrote:
> On 04/11, Eric Wong wrote:
> > On the other hand, I believe we should make run-command
> > vfork-compatible (and Brandon's series is a big (but incomplete)
> > step in the (IMHO) right direction); as anything which is
> > vfork-safe would also be safe in the presence of threads+(plain) fork.
> > With vfork; the two processes share heap until execve.
> 
> I haven't looked to much into vfork, one of the benefits of vfork is
> that it is slightly more preferment than vanilla fork correct?  What are
> some of the other benefits of using vfork over fork?

Yes, mainly performance and perhaps portability...  Last I
checked (over a decade ago); uCLinux without MMU could not
fork processes; only vfork.