emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous DNS


From: YAMAMOTO Mitsuharu
Subject: Re: Asynchronous DNS
Date: Sat, 27 Feb 2016 08:54:58 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Sun, 21 Feb 2016 11:29:12 +0100, Alain Schneble <address@hidden> 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
                                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]