X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=5de6d26a896024e3c205cdd7cbe64f03a5284fcd;hb=ad7b9fd5ca4ce1016a1e4703b07a0fdd865e5178;hp=63f13aa24e8d31d0677c42dc8404937388a29741;hpb=b244f98efeadff3b82d1dc617fdce9944b02f2e9;p=lttng-tools.git diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 63f13aa24..5de6d26a8 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -68,9 +68,21 @@ function full_cleanup () trap - SIGTERM && kill -- -$$ } +function null_pipes () +{ + exec 0>/dev/null + exec 1>/dev/null + exec 2>/dev/null +} trap full_cleanup SIGINT SIGTERM +# perl prove closes its child pipes before giving it a chance to run its +# signal trap handlers. Redirect pipes to /dev/null if SIGPIPE is caught +# to allow those trap handlers to proceed. + +trap null_pipes SIGPIPE + function print_ok () { # Check if we are a terminal