Re: [PATCH 4/4] t6000lib: workaround a possible dash bug

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

 



On Fri, Sep 21, 2007 at 01:45:11PM -0700, Eric Wong wrote:
>
> I tried to reproduce it on a quick script using shell functions,
> multiple arguments, spaces in the $a variable.., but haven't
> been successful.  However, reverting the below patch still
> causes errors in the latest git test suite.

Ah I see, it's a function.  Unfortunately POSIX requires
shell functions to have the variable assignment properties
of special built-ins.  So

	X=value func

has the same properties as

	X=value :

In other words, the value assigned to X (and any subsequent
values assigned within the function) persists after the call.
Also, the variable X is not exported unless it's already been
exported.

This is pretty lame but it's how the original Korn shell did
things and POSIX has adopted that.  Bash's POSIX mode tries
to balance things by both making the value persist and exporting
X.  Unfortunately this is buggy too as it causes X to continue
to be exported after the function returns.

So the bottom-line is that your patch is the correct solution
after all :)

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]

  Powered by Linux