On 2016/3/29 21:43, Paolo Bonzini wrote: > > > On 29/03/2016 14:03, Andrew Jones wrote: >>>> I am running kvm-unit-tests, the Bash(version is low) on my server doesn't support the command 'exec', so I changed some codes in kvm-unit-tests. >> Hmm, I didn't know there were bash versions w/out exec. Is your bash >> really bash? > > It could be the "{fd}<foo" feature, which according to > http://tiswww.case.edu/php/chet/bash/NEWS was introduced in 4.1: > > ---- > This is a terse description of the new features added to bash-4.1 since > the release of bash-4.0. > > [...] > > p. If the optional left-hand-side of a redirection is of the form > {var}, the shell assigns the file descriptor used to $var or uses $var > as the file descriptor to move or close, depending on the redirection > operator. > ---- > > Yijun, I think using "10" unconditionally would work (i.e. replace {fd} > and $fd with 10). > Yes, it works. Thanks very much! > Paolo > >>>> >>>> diff --git a/scripts/functions.bash b/scripts/functions.bash >>>> index f13fe6f..241ae0e 100644 >>>> --- a/scripts/functions.bash >>>> +++ b/scripts/functions.bash >>>> @@ -12,9 +12,10 @@ function for_each_unittest() >>>> local check >>>> local accel >>>> >>>> - exec {fd}<"$unittests" >>>> + #exec {fd}<"$unittests" > > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html