< prev index next >
src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java
Print this page
@@ -210,11 +210,21 @@
}
// The door is attached to .java_pid<pid> in the temporary directory.
private int openDoor(int pid) throws IOException {
socket_path = tmpdir + "/.java_pid" + pid;
+ try {
+ fd = open(socket_path);
+ } catch (IOException ioe) {
+ // Retry the operation after a short pause
+ try {
+ Thread.sleep(100);
fd = open(socket_path);
+ } catch (InterruptedException ie) {
+ // ignored
+ }
+ }
// Check that the file owner/permission to avoid attaching to
// bogus process
try {
checkPermissions(socket_path);
< prev index next >