emacs-devel
[Top][All Lists]
Advanced

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

Re: Asynchronous DNS


From: Lars Ingebrigtsen
Subject: Re: Asynchronous DNS
Date: Sat, 27 Feb 2016 14:27:30 +1030
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

YAMAMOTO Mitsuharu <address@hidden> writes:

>    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.

Yes, I think you're right.  If we check the status and it's
EAI_CANCELLED, then it's safe to free the request.  However, what do we
do if it isn't safe?  This is in `delete-process', so the process object
itself is going to go away, and then we lose track of p->dns_request, so
we can't free it.  I think.

Anybody got any ideas for scheduling that free_dns_request?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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