From 12702b312bdb63b15619fac682f3a2c205b94eba Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 5 Feb 2016 14:03:26 +1100 Subject: [PATCH] Make url.el use async DNS * lisp/url/url-gw.el (url-open-stream): Use non-blocking DNS. * src/process.c (syms_of_process): Add a `dns' subfeature for make-network-process. --- lisp/url/url-gw.el | 5 +++-- src/process.c | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el index 460ee0dd426..4d1dce68cbe 100644 --- a/lisp/url/url-gw.el +++ b/lisp/url/url-gw.el @@ -245,8 +245,9 @@ overriding the value of `url-gateway-method'." name buffer host service :type gw-method ;; Use non-blocking socket if we can. - :nowait (featurep 'make-network-process - '(:nowait t)))) + :nowait (and (featurep 'make-network-process + '(:nowait t)) + 'dns))) (`socks (socks-open-network-stream name buffer host service)) (`telnet diff --git a/src/process.c b/src/process.c index 86ca3f339ac..9653eba1e28 100644 --- a/src/process.c +++ b/src/process.c @@ -7921,6 +7921,9 @@ The variable takes effect when `start-process' is called. */); #ifdef NON_BLOCKING_CONNECT ADD_SUBFEATURE (QCnowait, Qt); +#ifdef HAVE_GETADDRINFO_A + ADD_SUBFEATURE (QCnowait, Qdns); +#endif #endif #ifdef DATAGRAM_SOCKETS ADD_SUBFEATURE (QCtype, Qdatagram); -- 2.39.5