* process.c (Fopen_network_stream): Turn off atimers for duration of call to
[bpt/emacs.git] / src / process.c
index 6972ba0..26f3f5e 100644 (file)
@@ -1862,7 +1862,16 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\
       immediate_quit = 1;
       QUIT;
 
+      /* This turns off all alarm-based interrupts; the
+        bind_polling_period call above doesn't always turn all the
+        short-interval ones off, especially if interrupt_input is
+        set.
+
+        It'd be nice to be able to control the connect timeout
+        though.  Would non-blocking connect calls be portable?  */
+      turn_on_atimers (0);
       ret = connect (s, lres->ai_addr, lres->ai_addrlen);
+      turn_on_atimers (1);
       if (ret == 0)
        break;
       emacs_close (s);