$MessageNumber =~ s/^.*::$Prefix\///;
$MessageNumber =~ /(\d+)/;
$MessageNumber = $1;
+ $ENV{'WEBSTUMP_MESSAGENUM'}= $MessageNumber;
$MessageFile = "$MNG_ROOT/tmp/messages/$MessageNumber";
}
print STDERR "Comment is: $comment\n" if( $comment );
+print STDERR "Signal handling for SIGPIPE: $SIG{PIPE}.\n";
$ENV{'EXPLANATION'} = $comment;
open( COMMAND, "| $command" ) || &processError( "$command failed" );
open( MESSAGE, "$MessageFile" ) || &processError( "Can't open $MessageFile" );
- print COMMAND while( <MESSAGE> );
- close( MESSAGE );
+ while( <MESSAGE> ) { print COMMAND or die $!; }
+ close( MESSAGE ) or die "$? $!";
# if( $comment && !($command =~ '^processRejected') ) {
# print COMMAND
# "\n======================================= MODERATOR'S COMMENT: \n" .
# $comment;
# }
-#close( COMMAND );
+close( COMMAND ) or die "$command $? $!";
&processError( "No action specified" )
if( $done ne "yes" );