Skip to content
Snippets Groups Projects
Commit dd09d5c6 authored by Mark Harrison's avatar Mark Harrison
Browse files

Print out a meaningful error when the state file can't be opened

git-svn-id: https://labs.omniti.com/resmon/branches/resmon2@379 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent 0e27b574
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,10 @@ my $REQUEST_TIMEOUT = 60;
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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment