Re: [PATCH] doc: filter-branch does not require re-export of vars

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 28, 2017 at 09:35:30PM -0400, Samuel Lijin wrote:

> > However, I think POSIX mandates the behavior you'd expect. And the only
> > shell I know that misbehaves in this way is Solaris /bin/sh, which we
> > have already declared too broken to support.
> 
> Off-topic, but where is this explicitly documented?

I couldn't find a place that mentioned it explicitly, but POSIX defines
the concept as "the export attribute" of the variables. Which implies to
me that the bit is tied to the variable itself, not its value.

It also says that the flag is cleared when a variable is unset, so:

  foo=one
  export foo
  sh -c 'echo $foo should be one'
  unset foo
  foo=two
  sh -c 'echo $foo is not exported'

That could potentially affect somebody writing a filter-branch snippet,
but presumably if they are using "unset" they know what they're doing.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]