Skip to content

Commit 2e9d5e3

Browse files
committed
8206145: dbgsysSocketClose - do not restart close if errno is EINTR [linux]
Reviewed-by: alanb, stuefe
1 parent b913444 commit 2e9d5e3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/jdk.jdwp.agent/unix/native/libdt_socket/socket_md.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,15 @@ dbgsysSocket(int domain, int type, int protocol) {
145145

146146
int dbgsysSocketClose(int fd) {
147147
int rv;
148+
149+
/* AIX recommends to repeat the close call on EINTR */
150+
#if defined(_AIX)
148151
do {
149152
rv = close(fd);
150153
} while (rv == -1 && errno == EINTR);
154+
#else
155+
rv = close(fd);
156+
#endif
151157

152158
return rv;
153159
}

0 commit comments

Comments
 (0)