See the discussion about this in https://bugs.debian.org/635711

I'm hoping this will resolve the intermittent SIGPIPEs plaguing
monkeysphere's postinst.

I'm still unable to reproduce the problem.  If people who can
reproduce the problem could try this patch and report back if it fixes
things for them, that would be great.
---
 src/share/common | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/share/common b/src/share/common
index e377ff3..2ea097e 100755
--- a/src/share/common
+++ b/src/share/common
@@ -38,6 +38,7 @@ log() {
     local output
     local alllevels
     local found=
+    local written=
 
     # don't include SILENT in alllevels: it's handled separately
     # list in decreasing verbosity (all caps).
@@ -50,6 +51,9 @@ log() {
 
     # just go ahead and return if the log level is silent
     if [ "$LOG_LEVEL" = 'SILENT' ] ; then
+        if [ ! "$2" ] ; then
+            cat >/dev/null
+        fi
        return
     fi
 
@@ -81,8 +85,12 @@ log() {
            else
                cat
            fi | sed 's/^/'"${LOG_PREFIX}"'/' >&2
+            written=true
        fi
     done
+    if [ "$written" != 'true' -a ! "$1" ]; then
+        cat >/dev/null
+    fi
 }
 
 # run command as monkeysphere user
-- 
2.1.3


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to