chiark / gitweb /
Merge branch 'master' of /u/webstump/live/
[modbot-mtm.git] / stump / bin / acceptFromMod.pl
index 3e408f103d2b297b9f6571a89c6d94b9b4ed57d6..cfc937199d473fddba11448c14331f248b79c725 100755 (executable)
@@ -50,6 +50,7 @@ while( <STDIN> ) {
       $MessageNumber =~ s/^.*::$Prefix\///;
       $MessageNumber =~ /(\d+)/;
       $MessageNumber = $1;
+      $ENV{'WEBSTUMP_MESSAGENUM'}= $MessageNumber;
 
       $MessageFile = "$MNG_ROOT/tmp/messages/$MessageNumber";
  
@@ -130,6 +131,7 @@ while( <> ) {
 }
 
 print STDERR "Comment is: $comment\n" if( $comment );
+print STDERR "Signal handling for SIGPIPE: $SIG{PIPE}.\n";
 
 $ENV{'EXPLANATION'} = $comment;
 
@@ -144,7 +146,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" );