[ash] on exec without arguments

Nguyen Thai Ngoc Duy pclouds at gmail.com
Wed Jul 18 18:42:53 UTC 2007


Silly me. We have to do some more to reload the shell itself. Sorry
for the noise.

On 7/18/07, Nguyen Thai Ngoc Duy <pclouds at gmail.com> wrote:
> Hi,
>
> There is a constraint in execcmd which only does exec if there is at
> least one argument. But I have a use-case where exec is called without
> any arguments [1]:
>
> exec 5>&1
> if test "$verbose" = "t"
> then
>         exec 4>&2 3>&1
> else
>         exec 4>/dev/null 3>/dev/null
> fi
>
> Can we just remove the condition?
>
> [1] http://repo.or.cz/w/git.git?a=blob;f=t/test-lib.sh;h=78d7e87e86178b90a350714c0b287353a0de20b4;hb=HEAD
> --
> Duy
>


-- 
Duy



More information about the busybox mailing list