emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/process.c [emacs-unicode-2]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/src/process.c [emacs-unicode-2]
Date: Thu, 11 Nov 2004 22:18:53 -0500

Index: emacs/src/process.c
diff -c emacs/src/process.c:1.408.2.9 emacs/src/process.c:1.408.2.10
*** emacs/src/process.c:1.408.2.9       Thu Nov  4 08:55:32 2004
--- emacs/src/process.c Fri Nov 12 02:52:56 2004
***************
*** 2723,2729 ****
    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 */
--- 2723,2728 ----
***************
*** 3024,3029 ****
--- 3023,3030 ----
      {
        int optn, optbits;
  
+     retry_connect:
+ 
        s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol);
        if (s < 0)
        {
***************
*** 3102,3109 ****
          break;
        }
  
-     retry_connect:
- 
        immediate_quit = 1;
        QUIT;
  
--- 3103,3108 ----
***************
*** 3145,3166 ****
  
        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)
--- 3144,3156 ----
  
        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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]