Merge branch 'mmap_fd_gt_3' into multi-server

This commit is contained in:
Isaac Connor 2015-09-16 11:01:06 -04:00
commit b8f2b1e0a0
1 changed files with 6 additions and 0 deletions

View File

@ -116,6 +116,12 @@ bool Monitor::MonitorLink::connect()
disconnect();
return( false );
}
while ( map_fd <= 2 ) {
int new_map_fd = dup(map_fd);
Warning( "Got one of the stdio fds for our mmap handle. map_fd was %d, new one is %d", map_fd, new_map_fd );
close(map_fd);
map_fd = new_map_fd;
}
struct stat map_stat;
if ( fstat( map_fd, &map_stat ) < 0 )