[vhffs-dev] [1382] improved error handling

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1382
Author:   gradator
Date:     2009-03-16 18:09:54 +0100 (Mon, 16 Mar 2009)

Log Message:
-----------
improved error handling

Modified Paths:
--------------
    trunk/vhffs-listengine/src/listengine.pl


Modified: trunk/vhffs-listengine/src/listengine.pl
===================================================================
--- trunk/vhffs-listengine/src/listengine.pl	2009-03-16 16:36:40 UTC (rev 1381)
+++ trunk/vhffs-listengine/src/listengine.pl	2009-03-16 17:09:54 UTC (rev 1382)
@@ -119,9 +119,9 @@
 		my $dir = $DIRECTORY.'/errors/';
 		Vhffs::Functions::create_dir( $dir ) if( ! -d $dir );
 		my $errorf = '/dev/null';
-		$errorf = $dir.time() if( -d $dir );  # not perfect but should be sufficient to fix errors
+		$errorf = $dir.time().'_'.$$ if( -d $dir );
 
-		open(SENDMAIL, "| $SENDMAIL_PATH 2> $errorf > /dev/null" ) or die( "Error - cannot open BSMTP input" );
+		open(SENDMAIL, "| $SENDMAIL_PATH 2> $errorf 1>&2" ) or die( "Error - cannot open BSMTP input" );
 		print SENDMAIL 'HELO '.$DOMAIN."\n";
 
 		foreach my $adr (@tos)


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/