8214300: .attach_pid files may remain in the process cwd
Reviewed-by: sspitsyn, cjplummer, jcbeyler
This commit is contained in:
parent
b4630d6207
commit
ec1f026392
@ -268,6 +268,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
|
||||
String path = "/proc/" + pid + "/cwd/" + fn;
|
||||
File f = new File(path);
|
||||
try {
|
||||
f = f.getCanonicalFile();
|
||||
f.createNewFile();
|
||||
} catch (IOException x) {
|
||||
f = new File(tmpdir, fn);
|
||||
|
@ -283,6 +283,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
|
||||
String path = "/proc/" + pid + "/cwd/" + fn;
|
||||
File f = new File(path);
|
||||
try {
|
||||
f = f.getCanonicalFile();
|
||||
f.createNewFile();
|
||||
} catch (IOException x) {
|
||||
String root;
|
||||
@ -295,6 +296,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
|
||||
root = tmpdir;
|
||||
}
|
||||
f = new File(root, fn);
|
||||
f = f.getCanonicalFile();
|
||||
f.createNewFile();
|
||||
}
|
||||
return f;
|
||||
|
@ -234,6 +234,7 @@ public class VirtualMachineImpl extends HotSpotVirtualMachine {
|
||||
String path = "/proc/" + pid + "/cwd/" + fn;
|
||||
File f = new File(path);
|
||||
try {
|
||||
f = f.getCanonicalFile();
|
||||
f.createNewFile();
|
||||
} catch (IOException x) {
|
||||
f = new File(tmpdir, fn);
|
||||
|
Loading…
Reference in New Issue
Block a user