shells: fix exitcode_trapN tests to avoid races

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-02-26 09:05:52 +01:00
parent 1555895b4a
commit 9aa751b08a
4 changed files with 4 additions and 8 deletions

View File

@ -3,7 +3,6 @@
$THIS_SH -c ' $THIS_SH -c '
trap "false;exit" term trap "false;exit" term
kill $$ & kill $$ &
(exit 42) (sleep 1; exit 42)
wait
' '
echo 42:$? echo 42:$?

View File

@ -5,7 +5,6 @@ $THIS_SH -c '
trap "echo INT" int trap "echo INT" int
trap "kill -int $$;exit" term trap "kill -int $$;exit" term
kill $$ & kill $$ &
(exit 42) (sleep 1; exit 42)
wait
' '
echo 42:$? echo 42:$?

View File

@ -3,7 +3,6 @@
$THIS_SH -c ' $THIS_SH -c '
trap "false;exit" term trap "false;exit" term
kill $$ & kill $$ &
(exit 42) (sleep 1; exit 42)
wait
' '
echo 42:$? echo 42:$?

View File

@ -5,7 +5,6 @@ $THIS_SH -c '
trap "echo INT" int trap "echo INT" int
trap "kill -int $$;exit" term trap "kill -int $$;exit" term
kill $$ & kill $$ &
(exit 42) (sleep 1; exit 42)
wait
' '
echo 42:$? echo 42:$?