This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #14719] Return EAI_SYSTEM from getaddrinfo if we run out of fds


Siddhesh Poyarekar <siddhesh@redhat.com> writes:

> +  else if (status != NSS_STATUS_SUCCESS && !any_service)
> +    /* We were no able to use any service.  */
                  not

>      *h_errnop = NO_RECOVERY;
>  #endif
>  #ifdef POSTPROCESS
> diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
> index 6b62c05..102afb2 100644
> --- a/resolv/nss_dns/dns-host.c
> +++ b/resolv/nss_dns/dns-host.c
> @@ -199,6 +199,10 @@ _nss_dns_gethostbyname3_r (const char *name, int af, struct hostent *result,
>  	  status = NSS_STATUS_TRYAGAIN;
>  	  h_errno = TRY_AGAIN;
>  	  break;
> +	/* System has run out of file descriptors.  */
> +	case EMFILE:
> +	case ENFILE:
> +	  h_errno = NETDB_INTERNAL;
>  	case ECONNREFUSED:
>  	case ETIMEDOUT:
>  	  status = NSS_STATUS_UNAVAIL;

Wouldn't NSS_STATUS_TRYAGAIN make more sense for E[MN]FILE?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]