about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2012-11-19 13:01:43 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2012-11-19 13:02:48 +0530
commitcfde9b463d63092ff0908d4c2748ace648e2ead8 (patch)
tree9ac0df733a6b3a01305f937e5e55ea63f3387328 /sysdeps/posix
parentf6da27e53695ad1cc0e2a9490358decbbfdff5e5 (diff)
downloadglibc-cfde9b463d63092ff0908d4c2748ace648e2ead8.tar.gz
glibc-cfde9b463d63092ff0908d4c2748ace648e2ead8.tar.xz
glibc-cfde9b463d63092ff0908d4c2748ace648e2ead8.zip
Return EAI_SYSTEM if we're out of file descriptors
Resolves BZ #14719.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 3cc244b7fd..d95c2d1156 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.  */