projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: utils.sh: handle SIGPIPE
[lttng-tools.git]
/
tests
/
utils
/
utils.sh
diff --git
a/tests/utils/utils.sh
b/tests/utils/utils.sh
index 71ddaa2cb5ea5a5c0e814eb307d201dcb2189817..0278bcf5e8eebc006bb1e2d7b10fc39e4e8e1f7e 100644
(file)
--- a/
tests/utils/utils.sh
+++ b/
tests/utils/utils.sh
@@
-68,9
+68,21
@@
function full_cleanup ()
trap - SIGTERM && kill -- -$$
}
trap - SIGTERM && kill -- -$$
}
+function null_pipes ()
+{
+ exec 0>/dev/null
+ exec 1>/dev/null
+ exec 2>/dev/null
+}
trap full_cleanup SIGINT SIGTERM
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
function print_ok ()
{
# Check if we are a terminal
This page took
0.025348 seconds
and
4
git commands to generate.