Blame SOURCES/nfs-utils-1.3.0-nfs_connect_nb-eintr.patch

851484
diff -up nfs-utils-1.3.0/support/nfs/rpc_socket.c.orig nfs-utils-1.3.0/support/nfs/rpc_socket.c
851484
--- nfs-utils-1.3.0/support/nfs/rpc_socket.c.orig	2014-03-25 11:12:07.000000000 -0400
851484
+++ nfs-utils-1.3.0/support/nfs/rpc_socket.c	2016-04-28 11:37:53.694236000 -0400
851484
@@ -215,7 +215,7 @@ static int nfs_connect_nb(const int fd,
851484
 	 * use it later.
851484
 	 */
851484
 	ret = connect(fd, sap, salen);
851484
-	if (ret < 0 && errno != EINPROGRESS) {
851484
+	if (ret < 0 && errno != EINPROGRESS && errno != EINTR) {
851484
 		ret = -1;
851484
 		goto done;
851484
 	}
851484
@@ -227,10 +227,16 @@ static int nfs_connect_nb(const int fd,
851484
 	FD_ZERO(&rset);
851484
 	FD_SET(fd, &rset);
851484
 
851484
-	ret = select(fd + 1, NULL, &rset, NULL, timeout);
851484
-	if (ret <= 0) {
851484
-		if (ret == 0)
851484
-			errno = ETIMEDOUT;
851484
+	while ((ret = select(fd + 1, NULL, &rset, NULL, timeout)) < 0) {
851484
+		if (errno != EINTR) {
851484
+			ret = -1;
851484
+			goto done;
851484
+		} else {
851484
+			continue;
851484
+		}
851484
+	}
851484
+	if (ret == 0) {
851484
+		errno = ETIMEDOUT;
851484
 		ret = -1;
851484
 		goto done;
851484
 	}