# HG changeset patch # User Richard M. Stallman # Date 774646543 0 # Node ID 97c2535b7f377d07ceb58608ddccf54661870107 # Parent 60e866c3e99c603d649e7aa6808d83f853cbb8c8 (Fopen_network_stream): Retry gethostbyname after TRY_AGAIN failure. diff -r 60e866c3e99c -r 97c2535b7f37 src/process.c --- 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 */ {