summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-10-30 21:53:07 +0100
committerGuillem Jover <guillem@debian.org>2016-10-31 00:36:51 +0100
commitf074889198fa4099474b068a611ebd56bbfc20d8 (patch)
treec1227818cc227ad343111cf10fdbe1760c00f4ff
parent703872d23958cf0a427f323026961b0dfbfdf99f (diff)
downloaddpkg-f074889198fa4099474b068a611ebd56bbfc20d8.tar.gz
test: Set SIGPIPE to a sane state
Some environments, such as Jenkins, set the SIGPIPE handler to ignore, which gets inherited by the test suite, and yes(1) barfs as it checks for error conditions after print. Reset the SIGPIPE handler to a sane default state.
-rw-r--r--t-func/atlocal.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/t-func/atlocal.in b/t-func/atlocal.in
index 9b8a44129..e37209349 100644
--- a/t-func/atlocal.in
+++ b/t-func/atlocal.in
@@ -19,6 +19,9 @@ unset BZIP
unset XZ_OPT
unset XZ_DEFAULTS
+# Restore SIGPIPE to a sane default state.
+trap - PIPE
+
if [ "$(id -u)" = 0 ]; then
ASROOT=
elif which fakeroot >/dev/null; then