From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Asynchronous DNS Date: Sun, 24 Jan 2016 15:14:26 +0100 Message-ID: References: <56A3F3CF.7000204@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1453644917 28959 80.91.229.3 (24 Jan 2016 14:15:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Jan 2016 14:15:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 24 15:15:08 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 1aNLRb-0003gW-M8 for ged-emacs-devel@m.gmane.org; Sun, 24 Jan 2016 15:15:07 +0100 Original-Received: from localhost ([::1]:60620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNLRX-0007BR-I9 for ged-emacs-devel@m.gmane.org; Sun, 24 Jan 2016 09:15:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNLRQ-0007B8-SL for emacs-devel@gnu.org; Sun, 24 Jan 2016 09:15:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNLRM-0004Hr-T6 for emacs-devel@gnu.org; Sun, 24 Jan 2016 09:14:56 -0500 Original-Received: from hermes.netfonds.no ([80.91.224.195]:60287) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNLRM-0004Hn-Mt for emacs-devel@gnu.org; Sun, 24 Jan 2016 09:14:52 -0500 Original-Received: from cm-84.215.1.64.getinternet.no ([84.215.1.64] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aNLQw-0002eB-Tc; Sun, 24 Jan 2016 15:14:26 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/vL++uH+/e7469HG vqz99Nj+/Ob+//MwBMGoAAACa0lEQVQ4jXWUQXfaMAyA/dK+l7NHCVfXZOa6YALXJRHtOcvCrsME nVPoa/7+JNvpDnvT4xHZn2TZsmRR9r3tO2ttT0rpNVvSTxAgaVv666wfBCZ6GYVn2qD0DEhH1AZR ymWfYcZoSYwAaq2NxjPNOI3IJh5kmdMsSMixCXt7gFrPJJqYs4xLKZFo7WZg8LxkD2e0SIXQx0UB e6XYhcKLMtNqYklgKKBOp2kczXlpGaQe3HZDMdSb9DYlHrSop+BxuhRObyahhEEPVAQU1CXpNIpU B49NACOB2QYlAZfOAFGxPk435HM4nt0d7rAdmu0DvP6E6Wb4HOzx9trcqzpvYP3y/TE/JEZ2weP9 FR6gzitYw/QOKe2XYmwCuEM9EGhWj3maIAPeyQct1bwMzTFv6uHpF3nQRemRyHC4V8cn+PJcri64 ouAE1EfYLufdxSyYqxUn9ZZGQCcX4UgBjHNKNP7eTDxK9TUGJxGaSgNqn58RCRRujBkBgL3zIDEe CJ8gEYKzTvdM2S20CA4e+CymN03bLdzfTSFf1ERX4kFGg7dv5WV/udiLa9bF7nDT4c6VeKwbSu2i GWrIDThtugjWBGC3r57qXW5hq03PwKnk649uvbeyODlFZrRBBlSwiRh9bCrKzchbTyi4bUPtJgEo lZADL2V7+VmxMha+D06AWsIZ7gK5qAJ57soIuF0qAFshL4xn6g/btzRLPYEEqhfn2+7KHiW1jpeq BLl3PE8VSjHmtSjEctYWAbQyw9C1krWzXHYeMIlNTCas8BPAoOw9Ck+EjE8DA/+OsMSvnxKN/5Rx aKP9J/hHmv8AgD+2WiXRwu/sYwAAAABJRU5ErkJggg== In-Reply-To: (Lars Magne Ingebrigtsen's message of "Sun, 24 Jan 2016 15:01:23 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-MailScanner-ID: 1aNLQw-0002eB-Tc MailScanner-NULL-Check: 1454249668.2339@+e/ZCSz6mPiv3YUK+JGBjw 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:198696 Archived-At: Lars Magne Ingebrigtsen writes: > Oh, and there's a getaddrinfo_a now in glibc? I didn't know that... > Then what are all these other libraries doing? > > I'll read the manpage. getaddrinfo_a looks quite straightforward. There are two modes: We can either get a signal back once we get a response, or we can poll to see whether there's any response. I guess polling would fit quite well with the Emacs event loop? That would be somewhere in wait_reading_process_output, I guess. It would then call gai_error on all sockets that are in the "resolving" state to determine whether there's a response (positive, negative, timeout) or not, and either continue the connection process, or mark the process as dead. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no