chiark / gitweb /
Debugging of modack.approved pipe failures
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Mar 2010 11:38:44 +0000 (11:38 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 19 Mar 2010 11:38:44 +0000 (11:38 +0000)
stump/bin/acceptFromMod.pl
stump/bin/processApproved

index 3e408f103d2b297b9f6571a89c6d94b9b4ed57d6..fde6b3d5f8e19bc8adb8cb5d8fe36ac8da11047d 100755 (executable)
@@ -130,6 +130,7 @@ while( <> ) {
 }
 
 print STDERR "Comment is: $comment\n" if( $comment );
+print STDERR "Signal handling for SIGPIPE: $SIG{PIPE}.\n";
 
 $ENV{'EXPLANATION'} = $comment;
 
@@ -144,7 +145,7 @@ open( COMMAND, "| $command" ) ||  &processError( "$command failed" );
 #       "\n======================================= MODERATOR'S COMMENT: \n" .
 #       $comment;
 #  }
-close( COMMAND ) or die "$? $!";
+close( COMMAND ) or die "$command $? $!";
 
 &processError( "No action specified" ) 
   if( $done ne "yes" );
index 615d0c17ccee00bd12715f9409c20f9fcdfcb51e..1b2f17642ae80b0eeee4629dfb2e2bdc1222ce18 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-set -e
+set -ex
 set -o pipefail
 
 NEWSBIN=/var/lib/newsbin; export NEWSBIN