From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alain Schneble Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Sat, 13 Feb 2016 11:16:57 +0100 Message-ID: <8637sw7w4m.fsf@realize.ch> References: <83twlnvcz2.fsf@gnu.org> <87vb63obm3.fsf@gnus.org> <87r3gqmg6g.fsf@gnus.org> <83egcqtfnm.fsf@gnu.org> <86mvrdmk8p.fsf@realize.ch> <877fihjo4m.fsf@gnus.org> <86io20n3xn.fsf@realize.ch> <8760y055l1.fsf@gnus.org> <8660xzmyyr.fsf@realize.ch> <87pow7ocyw.fsf@gnus.org> <861t8nmxlj.fsf@realize.ch> <87y4auiurw.fsf@gnus.org> <86k2me8dee.fsf@realize.ch> <83a8n9ddk5.fsf@gnu.org> <864mdh8vj5.fsf@realize.ch> <87pow579kt.fsf@gnus.org> <86ziv87st0.fsf@realize.ch> <87vb5u4qtq.fsf@gnus.org> <86egci6xvk.fsf@realize.ch> <87twldgsrv.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455358921 5495 80.91.229.3 (13 Feb 2016 10:22:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Feb 2016 10:22:01 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 13 11:22:01 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aUXKy-0004lO-DQ for ged-emacs-devel@m.gmane.org; Sat, 13 Feb 2016 11:22:00 +0100 Original-Received: from localhost ([::1]:40900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUXKx-0005Yg-L1 for ged-emacs-devel@m.gmane.org; Sat, 13 Feb 2016 05:21:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aUXGy-0004fw-4v for emacs-devel@gnu.org; Sat, 13 Feb 2016 05:17:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aUXGu-0000oW-3O for emacs-devel@gnu.org; Sat, 13 Feb 2016 05:17:52 -0500 Original-Received: from clientmail.realize.ch ([46.140.89.53]:2212) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1aUXGt-0000nI-Nq for emacs-devel@gnu.org; Sat, 13 Feb 2016 05:17:48 -0500 Original-Received: from rintintin.hq.realize.ch.lan.rit ([192.168.0.105]) by clientmail.realize.ch ; Sat, 13 Feb 2016 11:17:34 +0100 Original-Received: from MYNGB (192.168.66.65) by rintintin.hq.realize.ch.lan.rit (192.168.0.105) with Microsoft SMTP Server (TLS) id 15.0.516.32; Sat, 13 Feb 2016 11:16:57 +0100 In-Reply-To: <87twldgsrv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 13 Feb 2016 15:04:36 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (windows-nt) X-ClientProxiedBy: rintintin.hq.realize.ch.lan.rit (192.168.0.105) To rintintin.hq.realize.ch.lan.rit (192.168.0.105) X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] X-Received-From: 46.140.89.53 X-Mailman-Approved-At: Sat, 13 Feb 2016 05:21:56 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199867 Archived-At: Lars Ingebrigtsen writes: > Alain Schneble writes: > >> Currently, IINW, `set-process-coding-system' calls >> `setup_process_coding_systems' which basically requires infd/outfd to >> /complete/ its "task". Otherwise it just returns. > > Are you thinking about this code? Yes, I do: > setup_process_coding_systems (Lisp_Object process) > { > #ifdef subprocesses > struct Lisp_Process *p = XPROCESS (process); > int inch = p->infd; > int outch = p->outfd; > Lisp_Object coding_system; > > if (inch < 0 || outch < 0) > return; > > With :nowait t now, inch/outch will never be zero here, because we've ^^^ What do you mean by now? I was referring to the async DNS resolve case. > crated the sockets, even if we haven't connected them... So it seems > like it'll complete whatever it's doing even if those sockets aren't > connected. Possibly. That's true for the previous non-async DNS code. But with async DNS, the socket may not yet have been created. >> Later in the flow, `connect_network_socket' will be called and it >> invokes `set_network_socket_coding_system' near the end which in turn >> invokes `setup_process_coding_systems'. > > No, that code is called in make-network-process, so it's done before the > erc.el calls set-process-coding-system, so that's fine. Again, true for the code in master, but not for the current code in feature/async-dns branch, AFAICS.