From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Tue, 09 Feb 2016 11:40:19 +1100 Message-ID: <87twliiumk.fsf@gnus.org> References: <8760y7nag7.fsf@gnus.org> <83oabzzsjq.fsf@gnu.org> <87fuxazkfe.fsf@gnus.org> <83io25yeqk.fsf@gnu.org> <87h9hpnreg.fsf@gnus.org> <83y4b0wi7m.fsf@gnu.org> <87si17evk6.fsf@gnus.org> <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> <86wpqfl8ly.fsf@realize.ch> <86si13l1nt.fsf@realize.ch> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454978471 24145 80.91.229.3 (9 Feb 2016 00:41:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2016 00:41:11 +0000 (UTC) Cc: Eli Zaretskii , Alain Schneble , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 09 01:41: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 1aSwMS-00035X-Jl for ged-emacs-devel@m.gmane.org; Tue, 09 Feb 2016 01:40:56 +0100 Original-Received: from localhost ([::1]:50327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSwMR-0005cG-Nn for ged-emacs-devel@m.gmane.org; Mon, 08 Feb 2016 19:40:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSwMN-0005bs-Ql for emacs-devel@gnu.org; Mon, 08 Feb 2016 19:40:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSwMK-0006P5-Jm for emacs-devel@gnu.org; Mon, 08 Feb 2016 19:40:51 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:58140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSwMK-0006P1-DH; Mon, 08 Feb 2016 19:40:48 -0500 Original-Received: from cpe-60-225-211-161.nsw.bigpond.net.au ([60.225.211.161] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aSwLv-00059i-TU; Tue, 09 Feb 2016 01:40:24 +0100 In-Reply-To: (Andreas Schwab's message of "Mon, 08 Feb 2016 15:31:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aSwLv-00059i-TU MailScanner-NULL-Check: 1455583225.09093@lLTyMoCzR21vn6bOHG3wYQ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.224.195 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:199570 Archived-At: Andreas Schwab writes: > Alain Schneble writes: > >> True, but my assumption was that it would be illegal to call >> `accept-process-output' say, for example, from within >> `set-process-coding-system' for the sake of waiting for the DNS resolve >> to complete as it might have unwanted side effects. > > You have to wait for the completion event in some way. Yeah, these blockers would basically have to be a version of this thing from `send_process': while (! new_function_that_says_the_process_is_ready (proc)) wait_reading_process_output (0, 20 * 1000 * 1000, 0, 0, Qnil, NULL, 0); I think. Which is what send_process does on EWOULDBLOCK. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no