jdk/src/share/transport/socket/socketTransport.c
changeset 22605 dba3d6b22818
parent 15274 a77cdd5ea6e3
child 23010 6dadb192ad81
equal deleted inserted replaced
22604:9b394795e216 22605:dba3d6b22818
   504     int fd = socketFD;
   504     int fd = socketFD;
   505     socketFD = -1;
   505     socketFD = -1;
   506     if (fd < 0) {
   506     if (fd < 0) {
   507         return JDWPTRANSPORT_ERROR_NONE;
   507         return JDWPTRANSPORT_ERROR_NONE;
   508     }
   508     }
       
   509 #ifdef _AIX
       
   510     /*
       
   511       AIX needs a workaround for I/O cancellation, see:
       
   512       http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.basetechref/doc/basetrf1/close.htm
       
   513       ...
       
   514       The close subroutine is blocked until all subroutines which use the file
       
   515       descriptor return to usr space. For example, when a thread is calling close
       
   516       and another thread is calling select with the same file descriptor, the
       
   517       close subroutine does not return until the select call returns.
       
   518       ...
       
   519     */
       
   520     shutdown(fd, 2);
       
   521 #endif
   509     if (dbgsysSocketClose(fd) < 0) {
   522     if (dbgsysSocketClose(fd) < 0) {
   510         /*
   523         /*
   511          * close failed - it's pointless to restore socketFD here because
   524          * close failed - it's pointless to restore socketFD here because
   512          * any subsequent close will likely fail as well.
   525          * any subsequent close will likely fail as well.
   513          */
   526          */