* init.cfg (trap_sigpipe_or_skip_): A subshell with ignored SIGPIPE
was seen to not terminate, on Solaris 11 at least.
So protect with a timeout(1).
---
 init.cfg | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/init.cfg b/init.cfg
index 576f6ecd6..856aa2ee7 100644
--- a/init.cfg
+++ b/init.cfg
@@ -636,7 +636,10 @@ mkfifo_or_skip_()
 
 trap_sigpipe_or_skip_()
 {
-  (trap '' PIPE && yes | :) 2>&1 | grep -F 'Broken pipe' >/dev/null ||
+  timeout --version >/dev/null ||
+    skip_ 'trapping SIGPIPE cannot be safely checked'
+
+  (trap '' PIPE && timeout 10 yes |:) 2>&1 | grep 'Broken pipe' >/dev/null ||
     skip_ 'trapping SIGPIPE is not supported'
 }
 
-- 
2.26.2


Reply via email to