[Bug 190793] Some rc scripts return non zero status on success

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 190793] Some rc scripts return non zero status on success

bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190793

Jilles Tjoelker <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #9 from Jilles Tjoelker <[hidden email]> ---
(In reply to Devin Teske from comment #6)
It is true that 'set -e' may be a factor with this kind of changes, but there
are two factors which make it almost irrelevant here:

 * The functions in rc.subr are not supported with 'set -e' in effect. This
applies both while sourcing /etc/rc.subr and while calling functions defined in
it.

 * 'set -e' only causes an immediate exit when an untested simple command,
pipeline or subshell returns a non-zero exit status. One of the contexts
considered "tested" is any command before && or ||. Therefore, a compound
command  false && true  will not cause an immediate exit by itself, but only if
its non-zero exit status propagates to an outer function call, pipeline or
subshell which is itself untested.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "[hidden email]"