From 41a4c714e49e26f290e0c2e27a61d9086e633b52 Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Mon, 9 Nov 2015 18:50:21 +0000 Subject: tests: cleanup trapping of signal names A side effect of this cleanup is we no longer depend on our own kill command being built. * init.cfg (require_trap_signame_): A new function to verify that the shell supports specifying traps by signal name. (require_kill_group_): A new function to ensure the shell supports sending a signal to a group. * tests/du/move-dir-while-traversing.sh: Ensure trap supports signal names. * tests/misc/stty-invalid.sh: Likewise. * tests/misc/stty-pairs.sh: Likewise. * tests/misc/stty-row-col.sh: Likewise. * tests/misc/stty.sh: Likewise. * tests/misc/sort-compress.sh: Likewise. Also simplify trap call. * tests/install/trap.sh: Likewise. * tests/misc/timeout.sh: Likewise. * tests/dd/stats.sh: Likewise. Also use default kill command. * tests/misc/timeout-group.sh: Likewise. --- tests/install/trap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/install') diff --git a/tests/install/trap.sh b/tests/install/trap.sh index 0851ba623..157d1bc1f 100755 --- a/tests/install/trap.sh +++ b/tests/install/trap.sh @@ -19,12 +19,12 @@ . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src print_ver_ ginstall +require_trap_signame_ # 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=$(env kill -l CHLD 2>/dev/null) && trap '' $sig + trap '' CHLD # Before 2004-04-21, install would infloop, in the 'while (wait...' loop: exec ginstall -s "$abs_top_builddir/src/ginstall$EXEEXT" . -- cgit v1.2.3-70-g09d2