sh: Reduce unnecessary forks with eval.
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 21:36:38 +0000 (14:36 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 21:36:38 +0000 (14:36 -0700)
commitf15f366852663832eb02933efecc062dbff4bc59
tree377239d1a9ae59a5d4796edf759172e845d9f604
parent215809b779970af1a7de5914487f7e474ee48c4b
sh: Reduce unnecessary forks with eval.

The eval special builtin now runs the code with EV_EXIT if it was run
with EV_EXIT itself.

In particular, this eliminates one fork when a command substitution
contains an eval command that ends with an external program or a
subshell.

Obtained-from:   FreeBSD 223163
bin/sh/eval.c
tools/regression/bin/sh/expansion/cmdsubst11.0 [new file with mode: 0644]