HomeFreeBSD

sh: Expand here documents in the current process.
rS246288Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

sh: Expand here documents in the current process.

Expand here documents at the same point other redirections are expanded but
use a non-fork subshell environment (like simple command substitutions) for
compatibility. Substitition errors result in an empty here document like
before.

As a result, a fork is avoided for short (<4K) expanded here documents.

Unexpanded here documents (with quoted end marker after <<) are not affected
by this change. They already only forked when >4K.

Side effects:

  • Order of expansion is slightly different.
  • Slow expansions are not executed in parallel with the redirected command.
  • A non-fork subshell environment is subtly different from a forked process.

Details

Provenance
jillesAuthored on
Parents
rS246287: Rework in6_selectsrc function. Move the source address selection
Branches
Unknown
Tags
Unknown

Event Timeline