hotspot/src/share/vm/memory/filemap.cpp
changeset 37179 4dbcb3a642d2
parent 36508 5f9eee6b383b
parent 37113 5a33bf5089ac
child 37439 e8970711113b
equal deleted inserted replaced
36617:390e8993b88e 37179:4dbcb3a642d2
   370     if (errno == ENOENT) {
   370     if (errno == ENOENT) {
   371       // Not locating the shared archive is ok.
   371       // Not locating the shared archive is ok.
   372       fail_continue("Specified shared archive not found.");
   372       fail_continue("Specified shared archive not found.");
   373     } else {
   373     } else {
   374       fail_continue("Failed to open shared archive file (%s).",
   374       fail_continue("Failed to open shared archive file (%s).",
   375                     strerror(errno));
   375                     os::strerror(errno));
   376     }
   376     }
   377     return false;
   377     return false;
   378   }
   378   }
   379 
   379 
   380   _fd = fd;
   380   _fd = fd;
   400   // allow processes that have it open continued access to the file.
   400   // allow processes that have it open continued access to the file.
   401   remove(_full_path);
   401   remove(_full_path);
   402   int fd = open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0444);
   402   int fd = open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0444);
   403   if (fd < 0) {
   403   if (fd < 0) {
   404     fail_stop("Unable to create shared archive file %s: (%s).", _full_path,
   404     fail_stop("Unable to create shared archive file %s: (%s).", _full_path,
   405               strerror(errno));
   405               os::strerror(errno));
   406   }
   406   }
   407   _fd = fd;
   407   _fd = fd;
   408   _file_offset = 0;
   408   _file_offset = 0;
   409   _file_open = true;
   409   _file_open = true;
   410 }
   410 }