unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* DNS problem
@ 2006-09-23  7:09 William Xu
  2006-09-25 16:50 ` Xavier Maillard
       [not found] ` <mailman.7391.1159211762.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: William Xu @ 2006-09-23  7:09 UTC (permalink / raw)


Hi there, 

If DNS doesn't work before starting emacs, and after startup, i fix DNS
problem. Then i find emacs still has DNS problem, e.g., it couldn't
connect irc (using erc) or newsgroups by hostname. I restarted emacs, it
works. Is this normal?

-- 
William

Sushido, n.:
	The way of the tuna.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS problem
  2006-09-23  7:09 DNS problem William Xu
@ 2006-09-25 16:50 ` Xavier Maillard
  2006-09-26  2:48   ` William Xu
       [not found] ` <mailman.7391.1159211762.9609.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Xavier Maillard @ 2006-09-25 16:50 UTC (permalink / raw)
  Cc: help-gnu-emacs


  On Saturday, 23 September 2006, William Xu wrote:
> Hi there, 
> 
> If DNS doesn't work before starting emacs, and after startup, i fix DNS
> problem. Then i find emacs still has DNS problem, e.g., it couldn't
> connect irc (using erc) or newsgroups by hostname. I restarted emacs, it
> works. Is this normal?

That's a known "issue" (not to say bug) with the libc resolver. I
also suffered of it some time ago and fixed it with a very small
patch agains the resolver.

I can try to see if I can find it and send it to you.
-- 
Xavier

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS problem
  2006-09-25 16:50 ` Xavier Maillard
@ 2006-09-26  2:48   ` William Xu
  0 siblings, 0 replies; 5+ messages in thread
From: William Xu @ 2006-09-26  2:48 UTC (permalink / raw)


Xavier Maillard <zedek@gnu.org> writes:

> I can try to see if I can find it and send it to you.

That would be much appreciated.

-- 
William

There is only one way to be happy by means of the heart -- to have none.
		-- Paul Bourget

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS problem
       [not found] ` <mailman.7391.1159211762.9609.help-gnu-emacs@gnu.org>
@ 2006-09-26  5:08   ` Barry Margolin
  2006-09-26 23:15     ` Xavier Maillard
  0 siblings, 1 reply; 5+ messages in thread
From: Barry Margolin @ 2006-09-26  5:08 UTC (permalink / raw)


In article <mailman.7391.1159211762.9609.help-gnu-emacs@gnu.org>,
 Xavier Maillard <zedek@gnu.org> wrote:

>   On Saturday, 23 September 2006, William Xu wrote:
> > Hi there, 
> > 
> > If DNS doesn't work before starting emacs, and after startup, i fix DNS
> > problem. Then i find emacs still has DNS problem, e.g., it couldn't
> > connect irc (using erc) or newsgroups by hostname. I restarted emacs, it
> > works. Is this normal?
> 
> That's a known "issue" (not to say bug) with the libc resolver. I

By default, the resolver only reads /etc/resolv.conf the first time it's 
used in a process, and it caches the settings from then on.  So any 
long-lived processes always need to be restarted if you change this file 
and you want them to pick up the changes.

> also suffered of it some time ago and fixed it with a very small
> patch agains the resolver.
> 
> I can try to see if I can find it and send it to you.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: DNS problem
  2006-09-26  5:08   ` Barry Margolin
@ 2006-09-26 23:15     ` Xavier Maillard
  0 siblings, 0 replies; 5+ messages in thread
From: Xavier Maillard @ 2006-09-26 23:15 UTC (permalink / raw)
  Cc: help-gnu-emacs


  On Tuesday, 26 September 2006, Barry Margolin wrote:
> In article <mailman.7391.1159211762.9609.help-gnu-emacs@gnu.org>,
>  Xavier Maillard <zedek@gnu.org> wrote:
> 
> >   On Saturday, 23 September 2006, William Xu wrote:
> > > Hi there, 
> > > 
> > > If DNS doesn't work before starting emacs, and after startup, i fix DNS
> > > problem. Then i find emacs still has DNS problem, e.g., it couldn't
> > > connect irc (using erc) or newsgroups by hostname. I restarted emacs, it
> > > works. Is this normal?
> > 
> > That's a known "issue" (not to say bug) with the libc resolver. I
> 
> By default, the resolver only reads /etc/resolv.conf the first time it's 
> used in a process, and it caches the settings from then on.  So any 
> long-lived processes always need to be restarted if you change this file 
> and you want them to pick up the changes.

Before patching glibc (which is a non-trivial and may have side
effects on general glibc behaviour), you can "force" clients to
ack on resolv.conf changes by using the nscd command.

Ex: nscd -i hosts

This could be put in the script responsible to write your
/etc/resolv.conf for example. Or you can have a task watching for
resolv.conf timestamp and automatically call nscd when it changes.

Anyway, I opened a bug on bugs.gentoo.org[1] with a patch against
glibc-2.4. Note that libc-alpha do not want to do anything with
this and says to use nscd instead of this.


Footnotes: 
[1]  http://bugs.gentoo.org/show_bug.cgi?id=149124

-- 


CU Xavier

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-09-26 23:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-23  7:09 DNS problem William Xu
2006-09-25 16:50 ` Xavier Maillard
2006-09-26  2:48   ` William Xu
     [not found] ` <mailman.7391.1159211762.9609.help-gnu-emacs@gnu.org>
2006-09-26  5:08   ` Barry Margolin
2006-09-26 23:15     ` Xavier Maillard

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