dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joachim Breitner <mail@joachim-breitner.de>
To: Eric Blake <eblake@redhat.com>, dash@vger.kernel.org
Subject: Re: dash drops exported bash functions
Date: Wed, 10 Feb 2016 17:31:03 +0100	[thread overview]
Message-ID: <1455121863.18345.68.camel@joachim-breitner.de> (raw)
In-Reply-To: <56BB5D40.4070401@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1717 bytes --]

Dear Eric,

Am Mittwoch, den 10.02.2016, 08:54 -0700 schrieb Eric Blake:
> 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.

I’m not versed in reading POSIX,, so I won’t argue with that (although
I could not find a reference), but let me point out 8.1
"8.1 Environment Variable Definition" of "The Open Group Base
Specifications Issue 7" says
    “Other characters may be permitted by an implementation;
    applications shall tolerate the presence of such names.”

But it is not a big deal now, as the application suffering from this
issue will likely have to work-around this (or fix this, depending on
the POV) anyways.


Greetings,
Joachim
-- 
Joachim “nomeata” Breitner
  mail@joachim-breitner.de • https://www.joachim-breitner.de/
  XMPP: nomeata@joachim-breitner.de • OpenPGP-Key: 0xF0FBF51F
  Debian Developer: nomeata@debian.org


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-02-10 16:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 15:18 dash drops exported bash functions Joachim Breitner
2016-02-10 15:54 ` Eric Blake
2016-02-10 16:31   ` Joachim Breitner [this message]
2016-02-11  3:53 Makarius
2016-02-11 12:15 ` Makarius
2016-02-11 13:40   ` Makarius
2016-02-11 14:19     ` Olof Johansson
2016-02-11 14:30       ` Makarius
2016-02-11 14:46         ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455121863.18345.68.camel@joachim-breitner.de \
    --to=mail@joachim-breitner.de \
    --cc=dash@vger.kernel.org \
    --cc=eblake@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).