aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorKaroly Lorentey2004-11-13 18:34:40 +0000
committerKaroly Lorentey2004-11-13 18:34:40 +0000
commite417405015c93c81641f5c4a33ec898b5c353772 (patch)
tree017a980c35c8a71c372304418d151e3826f88636 /src/process.c
parentf590a2a442d19f3a74d7bbd02bbcb4e3239f2327 (diff)
parent68d1b30d251b4771f739d20f507cd9523ae3919b (diff)
downloademacs-e417405015c93c81641f5c4a33ec898b5c353772.tar.gz
emacs-e417405015c93c81641f5c4a33ec898b5c353772.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-673 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-674 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-675 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-676 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-677 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-678 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-679 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-680 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-681 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-682 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-683 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-684 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-685 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-686 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-687 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-688 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-689 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-690 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-691 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-692 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-693 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-69 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-70 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-71 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-267
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/process.c b/src/process.c
index db6e85c0fb3..65dec1457b0 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2722,7 +2722,6 @@ usage: (make-network-process &rest ARGS) */)
2722 int xerrno = 0; 2722 int xerrno = 0;
2723 int s = -1, outch, inch; 2723 int s = -1, outch, inch;
2724 struct gcpro gcpro1; 2724 struct gcpro gcpro1;
2725 int retry = 0;
2726 int count = SPECPDL_INDEX (); 2725 int count = SPECPDL_INDEX ();
2727 int count1; 2726 int count1;
2728 Lisp_Object QCaddress; /* one of QClocal or QCremote */ 2727 Lisp_Object QCaddress; /* one of QClocal or QCremote */
@@ -3023,6 +3022,8 @@ usage: (make-network-process &rest ARGS) */)
3023 { 3022 {
3024 int optn, optbits; 3023 int optn, optbits;
3025 3024
3025 retry_connect:
3026
3026 s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); 3027 s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol);
3027 if (s < 0) 3028 if (s < 0)
3028 { 3029 {
@@ -3101,8 +3102,6 @@ usage: (make-network-process &rest ARGS) */)
3101 break; 3102 break;
3102 } 3103 }
3103 3104
3104 retry_connect:
3105
3106 immediate_quit = 1; 3105 immediate_quit = 1;
3107 QUIT; 3106 QUIT;
3108 3107
@@ -3144,22 +3143,13 @@ usage: (make-network-process &rest ARGS) */)
3144 3143
3145 immediate_quit = 0; 3144 immediate_quit = 0;
3146 3145
3147 if (xerrno == EINTR)
3148 goto retry_connect;
3149 if (xerrno == EADDRINUSE && retry < 20)
3150 {
3151 /* A delay here is needed on some FreeBSD systems,
3152 and it is harmless, since this retrying takes time anyway
3153 and should be infrequent. */
3154 Fsleep_for (make_number (1), Qnil);
3155 retry++;
3156 goto retry_connect;
3157 }
3158
3159 /* Discard the unwind protect closing S. */ 3146 /* Discard the unwind protect closing S. */
3160 specpdl_ptr = specpdl + count1; 3147 specpdl_ptr = specpdl + count1;
3161 emacs_close (s); 3148 emacs_close (s);
3162 s = -1; 3149 s = -1;
3150
3151 if (xerrno == EINTR)
3152 goto retry_connect;
3163 } 3153 }
3164 3154
3165 if (s >= 0) 3155 if (s >= 0)