From cfde9b463d63092ff0908d4c2748ace648e2ead8 Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 19 Nov 2012 13:01:43 +0530 Subject: Return EAI_SYSTEM if we're out of file descriptors Resolves BZ #14719. --- sysdeps/posix/getaddrinfo.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 3cc244b..d95c2d1 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -1049,6 +1049,12 @@ gaih_inet (const char *name, const struct gaih_service *service, _res.options |= old_res_options & RES_USE_INET6; + if (status == NSS_STATUS_UNAVAIL) + { + result = GAIH_OKIFUNSPEC | -EAI_SYSTEM; + goto free_and_return; + } + if (no_data != 0 && no_inet6_data != 0) { /* If both requests timed out report this. */ -- cgit v1.1