revert size check for now

pull/2933/head
Isaac Connor 2014-08-04 11:26:33 -04:00 committed by Jan M. Hochstein
parent 582ac59963
commit ad002c78c1
1 changed files with 9 additions and 2 deletions

View File

@ -85,8 +85,15 @@ sub zmMemAttach( $$ )
{
my $mmap_file = $Config{ZM_PATH_MAP}."/zm.mmap.".$monitor->{Id};
if ( -s $mmap_file != $size ) {
Error( sprintf( "Memory map file '%s' should have been %d but was instead %d", $mmap_file, $size, -s $mmap_file ) );
if ( ! -e $mmap_file ) {
Error( sprintf( "Memory map file '%s' does not exist. zmc might not be running.", $mmap_file ) );
return ( undef );
}
my $mmap_file_size = -s $mmap_file;
if ( $mmap_file_size < $size ) {
Error( sprintf( "Memory map file '%s' should have been %d but was instead %d", $mmap_file, $size, $mmap_file_size ) );
return ( undef );
}
if ( !open( MMAP, "+<".$mmap_file ) )