[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/process.c [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/process.c [lexbind] |
Date: |
Thu, 11 Nov 2004 23:43:06 -0500 |
Index: emacs/src/process.c
diff -c emacs/src/process.c:1.373.2.16 emacs/src/process.c:1.373.2.17
*** emacs/src/process.c:1.373.2.16 Thu Nov 4 13:12:27 2004
--- emacs/src/process.c Fri Nov 12 04:21:15 2004
***************
*** 2722,2728 ****
int xerrno = 0;
int s = -1, outch, inch;
struct gcpro gcpro1;
- int retry = 0;
int count = SPECPDL_INDEX ();
int count1;
Lisp_Object QCaddress; /* one of QClocal or QCremote */
--- 2722,2727 ----
***************
*** 3023,3028 ****
--- 3022,3029 ----
{
int optn, optbits;
+ retry_connect:
+
s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol);
if (s < 0)
{
***************
*** 3101,3108 ****
break;
}
- retry_connect:
-
immediate_quit = 1;
QUIT;
--- 3102,3107 ----
***************
*** 3144,3165 ****
immediate_quit = 0;
- if (xerrno == EINTR)
- goto retry_connect;
- if (xerrno == EADDRINUSE && retry < 20)
- {
- /* A delay here is needed on some FreeBSD systems,
- and it is harmless, since this retrying takes time anyway
- and should be infrequent. */
- Fsleep_for (make_number (1), Qnil);
- retry++;
- goto retry_connect;
- }
-
/* Discard the unwind protect closing S. */
specpdl_ptr = specpdl + count1;
emacs_close (s);
s = -1;
}
if (s >= 0)
--- 3143,3155 ----
immediate_quit = 0;
/* Discard the unwind protect closing S. */
specpdl_ptr = specpdl + count1;
emacs_close (s);
s = -1;
+
+ if (xerrno == EINTR)
+ goto retry_connect;
}
if (s >= 0)