-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/18/15 10:40 AM, Eric Blake wrote:
> On 06/18/2015 08:22 AM, Chet Ramey wrote:
>> On 6/18/15 9:08 AM, Eric Blake wrote:
>>> On 06/18/2015 06:51 AM, Chet Ramey wrote:
>> 
>>>> 
>>>> Neither of these are failures; the export command returns
>>>> success.  In fact, according to Posix, the export command cannot
>>>> fail.
>> 
>>> Not quite true; export CAN fail: 
>>> http://austingroupbugs.net/view.php?id=351
>> 
>> Introducing declaration commands that treat arguments as
>> assignments implies that these are variable assignment errors, not
>> return status values from export.  This interpretation doesn't
>> change the description of export, which continues to list `zero' as
>> the only possible exit status.
> 
> Ah, but:
> 
> $ export 1 bash: export: `1': not a valid identifier $ echo $? 1
> 
> How can that be considered a variable assignment error; nothing was 
> assigned?

I didn't say that; I only mentioned what was included in the interpretation
in the link.

Obviously, export can fail.  Posix just doesn't acknowledge it.

- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAlWC2foACgkQu1hp8GTqdKvelwCcDXN9w8HdkU0YRUVpW4GtuG+C
IL0Anim1eqHcFeyVG18QpV5wKyP7Mde+
=bCiM
-----END PGP SIGNATURE-----

Reply via email to