unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: make-network-process's gethostbyname usage
Date: Wed, 22 Aug 2007 11:18:34 +0200	[thread overview]
Message-ID: <87veb8orkl.fsf@kfs-lx.testafd.dk> (raw)
In-Reply-To: <E1INUzc-0004c2-15@fencepost.gnu.org> (Richard Stallman's message of "Tue\, 21 Aug 2007 10\:46\:04 -0400")

Richard Stallman <rms@gnu.org> writes:

>     make-network-process calles gethostbyname, but never calls
>     res_init. The problem, which appears is: if contents of
>     /etc/resolv.conf was changed old dns servers are unavailable,
>     gethostbyname still tries them, not new ones. So this bug is pretty
>     much the same as http://bugs.debian.org/438680 (which has a patch).
>
> Would someone please DTRT about this, then ack?
> It needs to be fixed in Emacs 22.

I don't know what to do about this.

configure already has a check for res_init, but on my system (GNU/Linux),
HAVE_RES_INIT is undefined, indicating that it doesn't exist.

However, I believe that it does exist, but only if -lresolv is specified.

So how can we fix configure to DTRT?

a) Include -lresolv in the check for HAVE_RES_INIT.

b) Include -lresolv in LIBS if and only if HAVE_RES_INIT is defined.


If that is in place, it should be trivial to add

#if HAVE_RES_INIT
    res_init();
#endif

before all calls to gethostbyname and getaddrinfo.


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2007-08-22  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20  8:56 make-network-process's gethostbyname usage Alexander Kotelnikov
2007-08-21  8:43 ` Kim F. Storm
2007-08-21  9:51   ` Alexander Kotelnikov
2007-08-21 14:46 ` Richard Stallman
2007-08-22  9:18   ` Kim F. Storm [this message]
2007-08-22 11:32     ` Jan Djärv
2007-08-23  0:45     ` Richard Stallman
2007-08-25 19:06     ` Chong Yidong
2007-08-27 11:09       ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87veb8orkl.fsf@kfs-lx.testafd.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).