changeset 8287:97c2535b7f37

(Fopen_network_stream): Retry gethostbyname after TRY_AGAIN failure.
author Richard M. Stallman <rms@gnu.org>
date Tue, 19 Jul 1994 19:35:43 +0000
parents 60e866c3e99c
children 8695e414a2b1
files src/process.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/process.c	Tue Jul 19 19:35:08 1994 +0000
+++ b/src/process.c	Tue Jul 19 19:35:43 1994 +0000
@@ -1514,7 +1514,15 @@
     }
 
 #ifndef TERM
-  host_info_ptr = gethostbyname (XSTRING (host)->data);
+  while (1)
+    {
+      host_info_ptr = gethostbyname (XSTRING (host)->data);
+#ifdef TRY_AGAIN
+      if (! (host_info_ptr == 0 && h_errno == TRY_AGAIN))
+#endif
+	break;
+      Fsleep_for (make_number (1), Qnil);
+    }
   if (host_info_ptr == 0)
     /* Attempt to interpret host as numeric inet address */
     {