On 02/10/2016 08:18 AM, Joachim Breitner wrote: > Dear dash developers, > > a change in 0.5.8, very likely this one > http://git.kernel.org/cgit/utils/dash/dash.git/commit/?id=46d3c1a614f11f0d40a7e73376359618ff07abcd > broke the exporting of bash shell functions via the environment. Not a bug. POSIX says that on shell startup, the behavior of any inherited environment variables that do not start with a proper shell name is undefined; and allows shells to scrub such items out of the environment on startup. Just because bash does not scrub them (but instead treats them as shell function imports) does not mean dash has to behave the same. That said, preserving any unusable environment variables unchanged, rather than scrubbing them, may be slightly nicer behavior, but I'm not sure it's worth the bloat to dash to do so. > > Exporting bash functions via the environment might be a rarely used > feature, but it is used in practice, unfortunately (otherwise I > wouldn’t have noticed this). Exporting bash functions is only usable if you plan on directly invoking bash. Don't drag dash into the mess. Inserting a dash child in between a bash parent and grandchild means all bets are off for whether the grandparent can export anything to the grandchild. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature