equal
deleted
inserted
replaced
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 } |