tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rc.d/rndctl
On Tue, 04 Nov 2008, Robert Elz wrote:
[several other good comments snipped]
> To test for the sh bug with IFS handling that I suspect, change the
>
> IFS=';' eval set -- \$rndctl_flags
>
> line at the start of the function to
>
> oIFS=$IFS
> IFS=';'
> set -- $rndctl_flags
> IFS=$oIFS
It turns out that the problem is not a bug in NetBSD's /bin/sh,
but a mistake on my part. Either way, Robert's suggestion is
the right way to address the problem.
For normal commands, "VAR=value cmd args" sets the variable for the
duration of the command and reinstates the old value afterwards, but
for special built-in commands it sets the variable permanently. See
<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
#tag_02_14> for this rule, and
<http://www.opengroup.org/onlinepubs/009695399/idx/sbi.html>
for a list of special built-in utilities, which includes "eval".
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index