only unlink if zmc is being destroyed
This commit is contained in:
parent
6c7d71361a
commit
d3a7fca079
|
@ -675,11 +675,13 @@ Monitor::~Monitor()
|
|||
Fatal( "Can't munmap: %s", strerror(errno) );
|
||||
close( map_fd );
|
||||
|
||||
char mmap_path[PATH_MAX] = "";
|
||||
snprintf( mmap_path, sizeof(mmap_path), "%s/zm.mmap.%d", config.path_map, id );
|
||||
if ( purpose == CAPTURE ) {
|
||||
char mmap_path[PATH_MAX] = "";
|
||||
snprintf( mmap_path, sizeof(mmap_path), "%s/zm.mmap.%d", config.path_map, id );
|
||||
|
||||
if ( unlink( mmap_path ) < 0 ) {
|
||||
Warning( "Can't unlink '%s': %s", mmap_path, strerror(errno) );
|
||||
if ( unlink( mmap_path ) < 0 ) {
|
||||
Warning( "Can't unlink '%s': %s", mmap_path, strerror(errno) );
|
||||
}
|
||||
}
|
||||
#else // ZM_MEM_MAPPED
|
||||
struct shmid_ds shm_data;
|
||||
|
|
Loading…
Reference in New Issue