[Resmon-devel] [resmon commit] r379 - branches/resmon2/lib/Resmon

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Thu May 13 10:50:35 EDT 2010


Author: mark
Date: 2010-05-13 10:50:35 -0400 (Thu, 13 May 2010)
New Revision: 379

Modified:
   branches/resmon2/lib/Resmon/Status.pm
Log:
Print out a meaningful error when the state file can't be opened

Modified: branches/resmon2/lib/Resmon/Status.pm
===================================================================
--- branches/resmon2/lib/Resmon/Status.pm	2010-05-12 21:43:44 UTC (rev 378)
+++ branches/resmon2/lib/Resmon/Status.pm	2010-05-13 14:50:35 UTC (rev 379)
@@ -15,7 +15,10 @@
 sub new {
     my $class = shift;
     my $file = shift;
+    # State file used for communication between monitor and webserver
+    # processes
     my $fh = IO::File->new(".$file.state", "+>");
+    die "$0: Unable to open .$file.state: $!\n" unless (defined $fh);
     # Delete the just opened file - it stays open, but doesn't show on disk
     unlink ".$file.state";
     return bless {



More information about the Resmon-devel mailing list