From: Roland McGrath Date: Fri, 13 Jan 2006 20:13:21 +0000 (+0000) Subject: 2006-01-13 Roland McGrath X-Git-Tag: elfutils-0.120~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c40f58a64aec04758e9c50eda1b556789f74bdb9;p=platform%2Fupstream%2Felfutils.git 2006-01-13 Roland McGrath * run-native-test.sh: Do kill -9 and reap explicitly at end, since bash 3.1 whines when it's done in the trap 0 handler. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 7ea768b..28207cf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2006-01-13 Roland McGrath + + * run-native-test.sh: Do kill -9 and reap explicitly at end, since + bash 3.1 whines when it's done in the trap 0 handler. + 2006-01-11 Roland McGrath * testfile26.bz2: New data file. diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh index d820214..2a5f388 100755 --- a/tests/run-native-test.sh +++ b/tests/run-native-test.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2005, 2006 Red Hat, Inc. # # This program is Open Source software; you can redistribute it and/or # modify it under the terms of the Open Software License version 1.0 as @@ -25,11 +25,21 @@ tempfiles native.c native echo 'main () { while (1) pause (); }' > native.c native=0 +kill_native() +{ + test $native -eq 0 || { + kill -9 $native 2> /dev/null || : + wait $native 2> /dev/null || : + } + native=0 +} + native_cleanup() { - test $native -eq 0 || kill -9 $native || : - rm -f $remove_files + kill_native + test_cleanup } + trap native_cleanup 0 1 2 15 for cc in "$HOSTCC" "$HOST_CC" cc gcc "$CC"; do @@ -56,3 +66,10 @@ native_test() native_test ./allregs native_test ./funcretval + +# We do this explicitly rather than letting the trap 0 cover it, +# because as of version 3.1 bash prints the "Killed" report for +# $native when we do the kill inside the exit handler. +native_cleanup + +exit 0