From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Sat, 27 Feb 2016 08:54:58 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <87y4b393hl.fsf@gnus.org> <83io27ytu3.fsf@gnu.org> <87k2mmzkry.fsf@gnus.org> <83k2mlyet8.fsf@gnu.org> <87lh71nriy.fsf@gnus.org> <8637t8opla.fsf@realize.ch> <871t8skg6c.fsf@gnus.org> <86y4b0n5q2.fsf@realize.ch> <87fux7gb7o.fsf@gnus.org> <83wpqjvd2f.fsf@gnu.org> <87zivfobn4.fsf@gnus.org> <86y4ao5g1c.fsf@realize.ch> <87r3ggdo9f.fsf@gnus.org> <86twlb5yl4.fsf@realize.ch> <83d1rzz1mu.fsf@gnu.org> <86egcc49qu.fsf@realize.ch> <87io1k41cg.fsf@gnus.org> <56C8A89C.4020909@cs.ucla.edu> <861t873zlj.fsf@realize.ch> <56C8CD9D.1020504@cs.ucla.edu> <86twl22w7b.fsf@realize.ch> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1456530920 27743 80.91.229.3 (26 Feb 2016 23:55:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 26 Feb 2016 23:55:20 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Alain Schneble Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 27 00:55:15 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 1aZSE6-0004kr-6i for ged-emacs-devel@m.gmane.org; Sat, 27 Feb 2016 00:55:14 +0100 Original-Received: from localhost ([::1]:52587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZSE5-0001o9-Hy for ged-emacs-devel@m.gmane.org; Fri, 26 Feb 2016 18:55:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZSE1-0001mR-W3 for emacs-devel@gnu.org; Fri, 26 Feb 2016 18:55:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZSDy-0002gt-NZ for emacs-devel@gnu.org; Fri, 26 Feb 2016 18:55:09 -0500 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZSDy-0002ca-7A for emacs-devel@gnu.org; Fri, 26 Feb 2016 18:55:06 -0500 Original-Received: from fermat1.math.s.chiba-u.ac.jp (fermat [192.168.32.10]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 940BBC0577; Sat, 27 Feb 2016 08:54:58 +0900 (JST) In-Reply-To: <86twl22w7b.fsf@realize.ch> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 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:200700 Archived-At: >>>>> On Sun, 21 Feb 2016 11:29:12 +0100, Alain Schneble said: > That's a good point. Calling delete-process on a process with a > pending DNS request is the only situation so far where we explicitly > cancel the pending request using gai_cancel. 834 DEFUN ("delete-process", Fdelete_process, Sdelete_process, 1, 1, 0, 835 doc: /* Delete PROCESS: kill it and forget about it immediately. 836 PROCESS may be a process, a buffer, the name of a process or buffer, or 837 nil, indicating the current buffer's process. */) 838 (register Lisp_Object process) 839 { 840 register struct Lisp_Process *p; 841 842 process = get_process (process); 843 p = XPROCESS (process); 844 845 #ifdef HAVE_GETADDRINFO_A 846 if (p->dns_request) 847 { 848 gai_cancel (p->dns_request); 849 free_dns_request (process); 850 } 851 #endif The man page says gai_cancel does not cancel the request if it is currently being processed. So I suspect it is unsafe to free struct gaicb by calling free_dns_request if the request was not canceled actually. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp