src/jdk.attach/solaris/classes/sun/tools/attach/VirtualMachineImpl.java
changeset 55685 56b96d234f26
parent 54065 f984aca565c1
child 57844 3bc26ffdf001
equal deleted inserted replaced
55684:000138a6a4b3 55685:56b96d234f26
   202                 return 0;
   202                 return 0;
   203 
   203 
   204             return VirtualMachineImpl.read(s, bs, off, len);
   204             return VirtualMachineImpl.read(s, bs, off, len);
   205         }
   205         }
   206 
   206 
   207         public void close() throws IOException {
   207         public synchronized void close() throws IOException {
   208             VirtualMachineImpl.close(s);
   208             if (s != -1) {
       
   209                 int toClose = s;
       
   210                 s = -1;
       
   211                 VirtualMachineImpl.close(toClose);
       
   212             }
   209         }
   213         }
   210     }
   214     }
   211 
   215 
   212     // The door is attached to .java_pid<pid> in the temporary directory.
   216     // The door is attached to .java_pid<pid> in the temporary directory.
   213     private int openDoor(int pid) throws IOException {
   217     private int openDoor(int pid) throws IOException {