hotspot/src/share/vm/memory/filemap.cpp
changeset 37113 5a33bf5089ac
parent 36364 5971776598e5
child 37179 4dbcb3a642d2
equal deleted inserted replaced
37111:98572401ab0a 37113:5a33bf5089ac
   361     if (errno == ENOENT) {
   361     if (errno == ENOENT) {
   362       // Not locating the shared archive is ok.
   362       // Not locating the shared archive is ok.
   363       fail_continue("Specified shared archive not found.");
   363       fail_continue("Specified shared archive not found.");
   364     } else {
   364     } else {
   365       fail_continue("Failed to open shared archive file (%s).",
   365       fail_continue("Failed to open shared archive file (%s).",
   366                     strerror(errno));
   366                     os::strerror(errno));
   367     }
   367     }
   368     return false;
   368     return false;
   369   }
   369   }
   370 
   370 
   371   _fd = fd;
   371   _fd = fd;
   391   // allow processes that have it open continued access to the file.
   391   // allow processes that have it open continued access to the file.
   392   remove(_full_path);
   392   remove(_full_path);
   393   int fd = open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0444);
   393   int fd = open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0444);
   394   if (fd < 0) {
   394   if (fd < 0) {
   395     fail_stop("Unable to create shared archive file %s: (%s).", _full_path,
   395     fail_stop("Unable to create shared archive file %s: (%s).", _full_path,
   396               strerror(errno));
   396               os::strerror(errno));
   397   }
   397   }
   398   _fd = fd;
   398   _fd = fd;
   399   _file_offset = 0;
   399   _file_offset = 0;
   400   _file_open = true;
   400   _file_open = true;
   401 }
   401 }