Package: dash
Version: 0.5.5.1-7
Severity: important

Hi.

I may have found a place where dash violates POSIX.

If I do the following:
$ sh
$ set -e
$ false

it exits, as expected, and specified here
http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#set


However, when doing the following:
$ sh
$ set -e
$ . someNonExistentFile
.: 2: foo: not found
$ 

it does not exit.


Now the above documentation for -e says:
When this option is on, if a simple command fails for any of the reasons listed 
in
Consequences of Shell Errors or returns an exit status value >0, and is not 
part of
the compound list following a while, until, or if keyword, and is not a part of 
an
AND or OR list, and is not a pipeline preceded by the ! reserved word, then the
shell shall immediately exit.

"." is described here 
(http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#dot)
where it says all the following:
- If no readable file is found, a non-interactive shell shall abort; an 
interactive
shell shall write a diagnostic message to standard error, but this condition 
shall
not be considered a syntax error.
-EXIT STATUS: Returns the value of the last command executed, or a zero exit 
status
if no command is executed.


What is expected now by POSIX?


Cheers,
Chris.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to