aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorAlan Mackenzie2017-02-12 10:59:03 +0000
committerAlan Mackenzie2017-02-12 10:59:03 +0000
commitf4d5b687150810129b7a1d5b006e31ccf82b691b (patch)
tree4229b13800349032697daae3904dc3773e6b7a80 /src/process.c
parentd5514332d4a6092673ce1f78fadcae0c57f7be64 (diff)
parent148100d98319499f0ac6f57b8be08cbd14884a5c (diff)
downloademacs-f4d5b687150810129b7a1d5b006e31ccf82b691b.tar.gz
emacs-f4d5b687150810129b7a1d5b006e31ccf82b691b.zip
Merge branch 'master' into comment-cachecomment-cache
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/process.c b/src/process.c
index ab9657b15a4..434a3955b2c 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3431,16 +3431,14 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3431 break; 3431 break;
3432 } 3432 }
3433 3433
3434 immediate_quit = 1; 3434 maybe_quit ();
3435 QUIT;
3436 3435
3437 ret = connect (s, sa, addrlen); 3436 ret = connect (s, sa, addrlen);
3438 xerrno = errno; 3437 xerrno = errno;
3439 3438
3440 if (ret == 0 || xerrno == EISCONN) 3439 if (ret == 0 || xerrno == EISCONN)
3441 { 3440 {
3442 /* The unwind-protect will be discarded afterwards. 3441 /* The unwind-protect will be discarded afterwards. */
3443 Likewise for immediate_quit. */
3444 break; 3442 break;
3445 } 3443 }
3446 3444
@@ -3459,7 +3457,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3459 retry_select: 3457 retry_select:
3460 FD_ZERO (&fdset); 3458 FD_ZERO (&fdset);
3461 FD_SET (s, &fdset); 3459 FD_SET (s, &fdset);
3462 QUIT; 3460 maybe_quit ();
3463 sc = pselect (s + 1, NULL, &fdset, NULL, NULL, NULL); 3461 sc = pselect (s + 1, NULL, &fdset, NULL, NULL, NULL);
3464 if (sc == -1) 3462 if (sc == -1)
3465 { 3463 {
@@ -3481,8 +3479,6 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3481 } 3479 }
3482#endif /* !WINDOWSNT */ 3480#endif /* !WINDOWSNT */
3483 3481
3484 immediate_quit = 0;
3485
3486 /* Discard the unwind protect closing S. */ 3482 /* Discard the unwind protect closing S. */
3487 specpdl_ptr = specpdl + count; 3483 specpdl_ptr = specpdl + count;
3488 emacs_close (s); 3484 emacs_close (s);
@@ -3539,8 +3535,6 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3539#endif 3535#endif
3540 } 3536 }
3541 3537
3542 immediate_quit = 0;
3543
3544 if (s < 0) 3538 if (s < 0)
3545 { 3539 {
3546 /* If non-blocking got this far - and failed - assume non-blocking is 3540 /* If non-blocking got this far - and failed - assume non-blocking is
@@ -4012,8 +4006,7 @@ usage: (make-network-process &rest ARGS) */)
4012 struct addrinfo *res, *lres; 4006 struct addrinfo *res, *lres;
4013 int ret; 4007 int ret;
4014 4008
4015 immediate_quit = 1; 4009 maybe_quit ();
4016 QUIT;
4017 4010
4018 struct addrinfo hints; 4011 struct addrinfo hints;
4019 memset (&hints, 0, sizeof hints); 4012 memset (&hints, 0, sizeof hints);
@@ -4034,7 +4027,6 @@ usage: (make-network-process &rest ARGS) */)
4034#else 4027#else
4035 error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret); 4028 error ("%s/%s getaddrinfo error %d", SSDATA (host), portstring, ret);
4036#endif 4029#endif
4037 immediate_quit = 0;
4038 4030
4039 for (lres = res; lres; lres = lres->ai_next) 4031 for (lres = res; lres; lres = lres->ai_next)
4040 addrinfos = Fcons (conv_addrinfo_to_lisp (lres), addrinfos); 4032 addrinfos = Fcons (conv_addrinfo_to_lisp (lres), addrinfos);
@@ -5020,7 +5012,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5020 since we want to return C-g as an input character. 5012 since we want to return C-g as an input character.
5021 Otherwise, do pending quit if requested. */ 5013 Otherwise, do pending quit if requested. */
5022 if (read_kbd >= 0) 5014 if (read_kbd >= 0)
5023 QUIT; 5015 maybe_quit ();
5024 else if (pending_signals) 5016 else if (pending_signals)
5025 process_pending_signals (); 5017 process_pending_signals ();
5026 5018
@@ -5748,7 +5740,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
5748 { 5740 {
5749 /* Prevent input_pending from remaining set if we quit. */ 5741 /* Prevent input_pending from remaining set if we quit. */
5750 clear_input_pending (); 5742 clear_input_pending ();
5751 QUIT; 5743 maybe_quit ();
5752 } 5744 }
5753 5745
5754 return got_some_output; 5746 return got_some_output;
@@ -7486,7 +7478,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
7486 since we want to return C-g as an input character. 7478 since we want to return C-g as an input character.
7487 Otherwise, do pending quit if requested. */ 7479 Otherwise, do pending quit if requested. */
7488 if (read_kbd >= 0) 7480 if (read_kbd >= 0)
7489 QUIT; 7481 maybe_quit ();
7490 7482
7491 /* Exit now if the cell we're waiting for became non-nil. */ 7483 /* Exit now if the cell we're waiting for became non-nil. */
7492 if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) 7484 if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell)))