Blame SOURCES/glibc-rh767693-2.patch

b9ba6d
Index: glibc-2.5-20061008T1257/sunrpc/svc_tcp.c
b9ba6d
===================================================================
b9ba6d
--- glibc-2.5-20061008T1257.orig/sunrpc/svc_tcp.c
b9ba6d
+++ glibc-2.5-20061008T1257/sunrpc/svc_tcp.c
b9ba6d
@@ -50,6 +50,7 @@ static char sccsid[] = "@(#)svc_tcp.c 1.
b9ba6d
 #include <sys/poll.h>
b9ba6d
 #include <errno.h>
b9ba6d
 #include <stdlib.h>
b9ba6d
+#include <time.h>
b9ba6d
 
b9ba6d
 #ifdef USE_IN_LIBIO
b9ba6d
 # include <wchar.h>
b9ba6d
@@ -249,6 +250,11 @@ again:
b9ba6d
     {
b9ba6d
       if (errno == EINTR)
b9ba6d
 	goto again;
b9ba6d
+      if (errno == EMFILE)
b9ba6d
+        {
b9ba6d
+          struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
b9ba6d
+          __nanosleep(&ts , NULL);
b9ba6d
+        }
b9ba6d
       return FALSE;
b9ba6d
     }
b9ba6d
   /*
b9ba6d
Index: glibc-2.5-20061008T1257/sunrpc/svc_udp.c
b9ba6d
===================================================================
b9ba6d
--- glibc-2.5-20061008T1257.orig/sunrpc/svc_udp.c
b9ba6d
+++ glibc-2.5-20061008T1257/sunrpc/svc_udp.c
b9ba6d
@@ -46,6 +46,7 @@ static char sccsid[] = "@(#)svc_udp.c 1.
b9ba6d
 #include <sys/socket.h>
b9ba6d
 #include <errno.h>
b9ba6d
 #include <libintl.h>
b9ba6d
+#include <time.h>
b9ba6d
 
b9ba6d
 #ifdef IP_PKTINFO
b9ba6d
 #include <sys/uio.h>
b9ba6d
@@ -277,8 +278,16 @@ again:
b9ba6d
 		       (int) su->su_iosz, 0,
b9ba6d
 		       (struct sockaddr *) &(xprt->xp_raddr), &len;;
b9ba6d
   xprt->xp_addrlen = len;
b9ba6d
-  if (rlen == -1 && errno == EINTR)
b9ba6d
-    goto again;
b9ba6d
+  if (rlen == -1)
b9ba6d
+    {
b9ba6d
+      if (errno == EINTR)
b9ba6d
+        goto again;
b9ba6d
+      if (errno == EMFILE)
b9ba6d
+        {
b9ba6d
+          struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
b9ba6d
+          __nanosleep(&ts , NULL);
b9ba6d
+        }
b9ba6d
+    }
b9ba6d
   if (rlen < 16)		/* < 4 32-bit ints? */
b9ba6d
     return FALSE;
b9ba6d
   xdrs->x_op = XDR_DECODE;
b9ba6d
Index: glibc-2.5-20061008T1257/sunrpc/svc_unix.c
b9ba6d
===================================================================
b9ba6d
--- glibc-2.5-20061008T1257.orig/sunrpc/svc_unix.c
b9ba6d
+++ glibc-2.5-20061008T1257/sunrpc/svc_unix.c
b9ba6d
@@ -48,6 +48,7 @@
b9ba6d
 #include <errno.h>
b9ba6d
 #include <stdlib.h>
b9ba6d
 #include <libintl.h>
b9ba6d
+#include <time.h>
b9ba6d
 
b9ba6d
 #ifdef USE_IN_LIBIO
b9ba6d
 # include <wchar.h>
b9ba6d
@@ -247,6 +248,11 @@ again:
b9ba6d
     {
b9ba6d
       if (errno == EINTR)
b9ba6d
 	goto again;
b9ba6d
+      if (errno == EMFILE)
b9ba6d
+        {
b9ba6d
+          struct timespec ts = { .tv_sec = 0, .tv_nsec = 50000000 };
b9ba6d
+          __nanosleep(&ts , NULL);
b9ba6d
+        }
b9ba6d
       return FALSE;
b9ba6d
     }
b9ba6d
   /*