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