8206145: dbgsysSocketClose - do not restart close if errno is EINTR [linux]
Reviewed-by: alanb, stuefe
--- a/src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c Tue Jul 03 12:40:42 2018 +0200
+++ b/src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c Wed Jul 04 16:54:56 2018 +0200
@@ -145,9 +145,15 @@
int dbgsysSocketClose(int fd) {
int rv;
+
+ /* AIX recommends to repeat the close call on EINTR */
+#if defined(_AIX)
do {
rv = close(fd);
} while (rv == -1 && errno == EINTR);
+#else
+ rv = close(fd);
+#endif
return rv;
}