changeset 50984:f1f4b8cd0192

8206145: dbgsysSocketClose - do not restart close if errno is EINTR [linux] Reviewed-by: alanb, stuefe
author mbaesken
date Wed, 04 Jul 2018 16:54:56 +0200
parents 66a808262d3b
children cd41f34e548c
files src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }