[Bug 190793] Some rc scripts return non zero status on success
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Feb 3 14:23:39 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=190793
Jilles Tjoelker <jilles at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jilles at FreeBSD.org
--- Comment #9 from Jilles Tjoelker <jilles at FreeBSD.org> ---
(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.
More information about the freebsd-rc
mailing list