Mark Andrews writes:
>
> In message <rt-4.4.1-51431-1500887063-1383.45602-3-0@isc.org>, "Michal Kepien via RT" writes:
> > Most contemporary shells execute each command of a multi-command
> > pipeline in a subshell environment. Environment variables set inside a
> > subshell do not affect the parent shell's environment. Meanwhile, the
> > rrchecker system test sets the ret variable inside a while loop which is
> > the last command in a pipeline. Thus, while error messages will be
> > printed out when named-rrchecker encounters a problem, these problems
> > will not affect the result of the system test.
>
> The shell is broken if { } fails to update the variable. If ( )
> was being used then you would have a point.
(list) list is executed in a subshell environment (see
COMMAND EXECUTION ENVIRONMENT below). Variable
assignments and builtin commands that affect the
shell's environment do not remain in effect after the
command completes. The return status is the exit
status of list.
{ list; }
list is simply executed in the current shell
environment. list must be terminated with a newline
or semicolon. This is known as a group command. The
return status is the exit status of list. Note that
unlike the metachar- acters ( and ), { and } are
reserved words and must occur where a reserved word
is permitted to be recognized. Since they do not
cause a word break, they must be separated from list
by whitespace.
> > This issue seems to be have been present in the code ever since
> > named-rrchecker was added by commit 49c1e0d18d.
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742 INTERNET: marka@isc.org
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: marka@isc.org