From 4e9dd03b8c61ea20314b74691d5a2f74302e6953 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 9 Nov 2004 09:40:37 +0000 Subject: (Fmake_network_process): Remove kludge for interrupted connects on BSD. If connect is interrupted, just close socket and start over rather than sleeping and retry with same socket. --- src/process.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index bebcd577e9e..00bac03dc2b 100644 --- a/src/process.c +++ b/src/process.c @@ -3023,6 +3023,8 @@ usage: (make-network-process &rest ARGS) */) { int optn, optbits; + retry_connect: + s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); if (s < 0) { @@ -3101,8 +3103,6 @@ usage: (make-network-process &rest ARGS) */) break; } - retry_connect: - immediate_quit = 1; QUIT; @@ -3144,22 +3144,13 @@ usage: (make-network-process &rest ARGS) */) 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 (xerrno == EINTR) + goto retry_connect; } if (s >= 0) -- cgit v1.2.1 From eb943af0455393ec4340555312d47a6df0f1ab61 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Tue, 9 Nov 2004 11:15:46 +0000 Subject: (Fmake_network_process): Remove unused var 'retry'. --- src/process.c | 1 - 1 file changed, 1 deletion(-) (limited to 'src/process.c') diff --git a/src/process.c b/src/process.c index 00bac03dc2b..ec07e95c34a 100644 --- a/src/process.c +++ b/src/process.c @@ -2722,7 +2722,6 @@ usage: (make-network-process &rest ARGS) */) 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 */ -- cgit v1.2.1