aboutsummaryrefslogtreecommitdiffstats
path: root/src/sysdep.c
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1996-09-20 06:11:20 +0000
committerRichard M. Stallman <[email protected]>1996-09-20 06:11:20 +0000
commitdb4042c888b7c793167e3326f5e719ac53445b15 (patch)
tree7f830bec7bba2e276f66a8d2db64a829f7644327 /src/sysdep.c
parent92c51e075e8bc9c2ace8487bfc42f23389d09b73 (diff)
(init_system_name): Retry gethostbyname only 5 times
and don't sleep after the last time.
Diffstat (limited to 'src/sysdep.c')
-rw-r--r--src/sysdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sysdep.c b/src/sysdep.c
index a7026b8782..62a0194cdf 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2198,7 +2198,7 @@ init_system_name ()
{
struct hostent *hp;
int count;
- for (count = 0; count < 10; count++)
+ for (count = 0;; count++)
{
#ifdef TRY_AGAIN
h_errno = 0;
@@ -2208,6 +2208,8 @@ init_system_name ()
if (! (hp == 0 && h_errno == TRY_AGAIN))
#endif
break;
+ if (count >= 5)
+ break;
Fsleep_for (make_number (1), Qnil);
}
if (hp)