Alain Schneble writes: > But what seems strange to me right now is this code in check_for_dns: > > /* The DNS lookup failed. */ > else if (!EQ (p->status, Qconnect)) > { > ... > > Actually, I tried it out and DNS lookups seem to timeout quite fast on > my machine if there is no network connection. But they do not enter the > if-branch above. That seems like an error. Am I day-dreaming or > shouldn't it be rewritten to look like this? > > /* The DNS lookup failed. */ > else if (EQ (p->status, Qconnect)) > { > ... And here is the patch. It indeed seems to resolve the issue. And another one as well. Before, if DNS lookup of at least one process failed and Emacs was requested to terminate (C-x C-c, save-buffers-kill-terminal), it hung. Because there was still one or several processes in "connect" state. It was stuck in wait_for_socket_fds. Maybe there are other cases where it still does not behave properly, also after having applied this patch. I'll try to understand the other branches, where the process state won't be touched even if DNS request failed...