From: Jim Meyering Date: Wed, 28 Sep 2005 18:33:11 +0000 (+0000) Subject: Work around a bug in FreeBSD 5.0. X-Git-Tag: v5.90~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfb5ed16a2d28fa8b39f4bfb46328a970e9d28e0;p=thirdparty%2Fcoreutils.git Work around a bug in FreeBSD 5.0. --- diff --git a/tests/install/trap b/tests/install/trap index e95eb8f1c2..7bb09ae83a 100755 --- a/tests/install/trap +++ b/tests/install/trap @@ -23,10 +23,13 @@ fi fail=0 -# ash doesn't support "trap '' CHLD"; it knows only signal numbers. -sig=`$pwd/../../src/kill -l CHLD 2>/dev/null` && trap '' $sig - -# Before 2004-04-21, install would infloop, in the `while (wait...' loop: -ginstall -s $pwd/../../src/ginstall$EXEEXT . +# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh. +( + # ash doesn't support "trap '' CHLD"; it knows only signal numbers. + sig=`$pwd/../../src/kill -l CHLD 2>/dev/null` && trap '' $sig + + # Before 2004-04-21, install would infloop, in the `while (wait...' loop: + exec ginstall -s $pwd/../../src/ginstall$EXEEXT . +) (exit $fail); exit $fail