[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: infloop in `make check' on FreeBSD 5.0: due to /bin/sh?
From: |
Paul Eggert |
Subject: |
Re: infloop in `make check' on FreeBSD 5.0: due to /bin/sh? |
Date: |
Wed, 28 Sep 2005 10:34:00 -0700 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> FYI: I've just added this warning to coreutils' README file:
> ***********************
> FreeBSD 5.0 `make test' infinite loop with /bin/sh
> -----------------------
>
> When building and running `make test' on a FreeBSD 5.0 system,
> expect the tests/install/trap test to get stuck in an infinite
> loop. That appears to be due to a bug in /bin/sh.
I didn't see the original bug report, but if that /bin/sh bug is what
I think it might be, the following patch would work around the
problem. Can this be tried out on FreeBSD 5.0?
2005-09-28 Paul Eggert <address@hidden>
* tests/install/trap: Work around a bug in FreeBSD 5.0.
--- trap.~1.3.~ 2005-04-20 17:30:35.000000000 -0700
+++ trap 2005-09-28 10:32:31.000000000 -0700
@@ -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
+# 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:
-ginstall -s $pwd/../../src/ginstall$EXEEXT .
+ # Before 2004-04-21, install would infloop, in the `while (wait...' loop:
+ exec ginstall -s $pwd/../../src/ginstall$EXEEXT .
+)
(exit $fail); exit $fail