From c6368c4a1ad6c989d58ef23963d04db9dab7227d Mon Sep 17 00:00:00 2001 From: Andy Bauer Date: Tue, 20 Dec 2016 13:49:07 -0600 Subject: [PATCH] replace zmMemInvalidate with zmMemDetach --- scripts/zmtrigger.pl.in | 2 +- scripts/zmwatch.pl.in | 7 ++++--- scripts/zmx10.pl.in | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/zmtrigger.pl.in b/scripts/zmtrigger.pl.in index 2f180e090..b3de9f433 100644 --- a/scripts/zmtrigger.pl.in +++ b/scripts/zmtrigger.pl.in @@ -418,7 +418,7 @@ while( 1 ) foreach my $monitor ( values(%monitors) ) { # Free up any used memory handle - zmMemInvalidate( $monitor ); + zmMemDetach( $monitor ); } loadMonitors(); } diff --git a/scripts/zmwatch.pl.in b/scripts/zmwatch.pl.in index c35c4ea8a..9a850663f 100644 --- a/scripts/zmwatch.pl.in +++ b/scripts/zmwatch.pl.in @@ -89,8 +89,8 @@ while( 1 ) my $restart = 0; # Prevent open handles building up if we have connect to shared memory # Many of our error checks below do a next without closing the mem handle. - # zmMemInvalidate will just return of nothing is open, so we can just do this here. - zmMemInvalidate( $monitor ); + # zmMemDetach will just return of nothing is open, so we can just do this here. + zmMemDetach( $monitor ); if ( zmMemVerify( $monitor ) && zmMemRead( $monitor, "shared_data:valid" ) ) @@ -141,6 +141,7 @@ while( 1 ) { $command = "zmdc.pl restart zmc -m $monitor->{Id}"; } + zmMemDetach( $monitor ); # Close our file handle to the zmc process we are about to end runCommand( $command ); } elsif ( $monitor->{Function} ne 'Monitor' ) @@ -184,7 +185,7 @@ while( 1 ) } # end if restart } # end if check analysis daemon # Prevent open handles building up if we have connect to shared memory - zmMemInvalidate( $monitor ); + zmMemDetach( $monitor ); } # end foreach monitor sleep( $Config{ZM_WATCH_CHECK_INTERVAL} ); } # end while (1) diff --git a/scripts/zmx10.pl.in b/scripts/zmx10.pl.in index 8daa63c87..856f163d6 100644 --- a/scripts/zmx10.pl.in +++ b/scripts/zmx10.pl.in @@ -580,7 +580,7 @@ sub loadTasks } } } - zmMemInvalidate( $monitor ); + zmMemDetach( $monitor ); } }