aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorLars Ingebrigtsen2016-02-05 13:57:28 +1100
committerLars Ingebrigtsen2016-02-05 13:57:28 +1100
commitc85e7d4c8c899c01d6b4a393512bab295ef635c1 (patch)
treefc778b2e9774b4d8a518044723db18d79331b9fb /src/process.c
parente4c58cf3feb853f2808204e85529d9365b31a6b4 (diff)
downloademacs-c85e7d4c8c899c01d6b4a393512bab295ef635c1.tar.gz
emacs-c85e7d4c8c899c01d6b4a393512bab295ef635c1.zip
Only do async DNS if requested with :nowait 'dns
* doc/lispref/processes.texi (Network Processes): Mention the dns value of :nowait. * src/process.c (Fmake_network_process): Only do async DNS if :nowait is `dns'.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c
index b232e331151..86ca3f339ac 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3421,11 +3421,16 @@ system used for both reading and writing for this process. If CODING
3421is a cons (DECODING . ENCODING), DECODING is used for reading, and 3421is a cons (DECODING . ENCODING), DECODING is used for reading, and
3422ENCODING is used for writing. 3422ENCODING is used for writing.
3423 3423
3424:nowait BOOL -- If BOOL is non-nil for a stream type client process, 3424:nowait NOWAIT -- If NOWAIT is non-nil for a stream type client
3425return without waiting for the connection to complete; instead, the 3425process, return without waiting for the connection to complete;
3426sentinel function will be called with second arg matching "open" (if 3426instead, the sentinel function will be called with second arg matching
3427successful) or "failed" when the connect completes. Default is to use 3427"open" (if successful) or "failed" when the connect completes.
3428a blocking connect (i.e. wait) for stream type connections. 3428Default is to use a blocking connect (i.e. wait) for stream type
3429connections. If NOWAIT is `dns', also do the DNS lookup
3430asynchronously, if supported. In that case, the process is returned
3431before a connection has been made, and the client should not try
3432communicating with the process until it has changed status to
3433"connected".
3429 3434
3430:noquery BOOL -- Query the user unless BOOL is non-nil, and process is 3435:noquery BOOL -- Query the user unless BOOL is non-nil, and process is
3431running when Emacs is exited. 3436running when Emacs is exited.
@@ -3688,7 +3693,7 @@ usage: (make-network-process &rest ARGS) */)
3688#endif 3693#endif
3689 3694
3690#ifdef HAVE_GETADDRINFO_A 3695#ifdef HAVE_GETADDRINFO_A
3691 if (!NILP (Fplist_get (contact, QCnowait)) && 3696 if (EQ (Fplist_get (contact, QCnowait), Qdns) &&
3692 !NILP (host)) 3697 !NILP (host))
3693 { 3698 {
3694 int ret; 3699 int ret;
@@ -4603,7 +4608,7 @@ check_for_dns (Lisp_Object proc)
4603 return Qnil; 4608 return Qnil;
4604 4609
4605 /* This process should not already be connected (or killed). */ 4610 /* This process should not already be connected (or killed). */
4606 if (p->infd != 0) 4611 if (!EQ (p->status, Qconnect))
4607 return Qnil; 4612 return Qnil;
4608 4613
4609 ret = gai_error (p->dns_requests[0]); 4614 ret = gai_error (p->dns_requests[0]);
@@ -7752,6 +7757,7 @@ syms_of_process (void)
7752 DEFSYM (QCcoding, ":coding"); 7757 DEFSYM (QCcoding, ":coding");
7753 DEFSYM (QCserver, ":server"); 7758 DEFSYM (QCserver, ":server");
7754 DEFSYM (QCnowait, ":nowait"); 7759 DEFSYM (QCnowait, ":nowait");
7760 DEFSYM (Qdns, "dns");
7755 DEFSYM (QCsentinel, ":sentinel"); 7761 DEFSYM (QCsentinel, ":sentinel");
7756 DEFSYM (QCtls_parameters, ":tls-parameters"); 7762 DEFSYM (QCtls_parameters, ":tls-parameters");
7757 DEFSYM (QClog, ":log"); 7763 DEFSYM (QClog, ":log");