mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8374998: Failing os::write - remove bad file
Reviewed-by: mdoerr, lucy
This commit is contained in:
parent
983ae96f60
commit
4c9103f7b6
@ -112,6 +112,10 @@ static void save_memory_to_file(char* addr, size_t size) {
|
||||
result = ::close(fd);
|
||||
if (result == OS_ERR) {
|
||||
warning("Could not close %s: %s\n", destfile, os::strerror(errno));
|
||||
} else {
|
||||
if (!successful_write) {
|
||||
remove(destfile);
|
||||
}
|
||||
}
|
||||
}
|
||||
FREE_C_HEAP_ARRAY(char, destfile);
|
||||
@ -949,6 +953,7 @@ static int create_sharedmem_file(const char* dirname, const char* filename, size
|
||||
warning("Insufficient space for shared memory file: %s/%s\n", dirname, filename);
|
||||
}
|
||||
result = OS_ERR;
|
||||
remove(filename);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user