tech-userlevel archive

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

Re: sh -e changes broke pkgsrc



cheusov%tut.by@localhost said:
> Another bug in that spec. 
> [...]
>    -e When this option is on, if a simple command fails

As said, I think that the "simple command" wording is misleading.
What counts are the points where the shell (the outer one)
checks an exit status. For the "-e" considerations, a pipeline
is still "simple" because the return value of anything left of
a "|" is not checked.

>      'true && false' should exit
>      'false && anything' should NOT exit
>      'false || false' should exit

Agreed.

>    '! true' should exit just like most shells do
>    '! anything | true' should exit just like most shells do

I don't think so. The "!" evaluates the exit status.
I also don't buy that "most" shells exit here.

best regards
Matthias




-------------------------------------------------------------------
-------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich

Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
Dr. Sebastian M. Schmidt
-------------------------------------------------------------------
-------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index