8206145: dbgsysSocketClose - do not restart close if errno is EINTR [linux]

Reviewed-by: alanb, stuefe
This commit is contained in:
Matthias Baesken 2018-07-04 16:54:56 +02:00
parent b913444be0
commit 2e9d5e3d8a

View File

@ -145,9 +145,15 @@ dbgsysSocket(int domain, int type, int protocol) {
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;
}