MFC r230998,r233792: sh: Use vfork in a few common cases.
This uses vfork() for simple commands and command substitutions containing a
single simple command, invoking an external program under certain conditions
(no redirections or variable assignments, non-interactive shell, no job
control). These restrictions limit the amount of code executed in a vforked
child.
Various incarnations of this patch have been shown to bring performance
improvements:
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-January/037581.html
The use of vfork() can be disabled by setting a variable named
SH_DISABLE_VFORK.
git-svn-id: svn://svn.freebsd.org/base/stable/9@249242
ccf9f872-aa2e-dd11-9fc8-
001c23d0bc1f