On 1/7/19 4:15 AM, Robert Elz wrote:
> Date: Sun, 6 Jan 2019 17:22:36 -0500
> From: Chet Ramey <[email protected]>
> Message-ID: <[email protected]>
>
> | Bash, in its default mode, considers errors from builtins non-fatal. When
> | you run this in posix mode, which makes a distinction between "special"
> and
> | "regular" builtins, it should be a fatal error because POSIX says a non
> | interactive shell needs to exit if a special builtin fails. It's a bug in
> | bash if it doesn't do that in posix mode.
>
> But return is not required to fail if it does not appear in a function or .
> script, what POSIX says is ...
Sure. But if it returns non-zero in default mode, it should return non-zero
in posix mode. And if it returns non-zero in posix mode, the shell should
exit, because it's a special builtin.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/