Sfoglia il codice sorgente

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.
Guillem Jover 9 anni fa
parent
commit
f074889198
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      t-func/atlocal.in

+ 3 - 0
t-func/atlocal.in

@@ -19,6 +19,9 @@ unset BZIP
 unset XZ_OPT
 unset XZ_OPT
 unset XZ_DEFAULTS
 unset XZ_DEFAULTS
 
 
+# Restore SIGPIPE to a sane default state.
+trap - PIPE
+
 if [ "$(id -u)" = 0 ]; then
 if [ "$(id -u)" = 0 ]; then
   ASROOT=
   ASROOT=
 elif which fakeroot >/dev/null; then
 elif which fakeroot >/dev/null; then