>>>> "Karl" == Karl Kleinpaste
<karl(a)charcoal.com> writes:
Karl> If my dialup network connection drops, but the nameserver is
Karl> still running, XEmacs hangs evidently forever, trying to
Karl> learn something about its network environment. "strace
Karl> xemacs -q" shows that it gets stuck in poll(2), looking for
Karl> data from the nameserver.
Probably IPv6. From PROBLEMS:
**** New problem: IPv6 CNAME lookup
A newer problem is due to XEmacs changing to use the modern
getaddrinfo() interface from the older gethostbyname() interface. The
solution above is insufficient, because getaddrinfo() by default tries
to get IPv6 information for localhost. This always involves a dns
lookup to get the CNAME, and the strategies above don't work. It then
falls back to IPv4 behavior. This is good[tm]; trust us.
***** Robust network case
Configure your network so that there are no nameservers configured
until the network is actually running. getaddrinfo() will not try to
access a nameserver that isn't configured.
***** Flaky network case
If you have a flaky modem or DSL connection that can be relied on only
to go down whenever you want to bring XEmacs up, you need to force
IPv4 behavior. Explicitly setting DISPLAY=127.0.0.1:0.0 (or whatever
is appropriate) works in most cases.
If you cannot or do not want to do that, you can hard code IPv4
behavior in src/process-unix.c. This is bad[tm], on your own head be
it. In the function unix_canonicalize_host_name() about ten lines
down, change the statement
hints.ai_family = AF_UNSPEC;
to
hints.ai_family = PF_INET;
and rebuild XEmacs.
getaddrinfo() is also called in src/sysdep.c:init_system_name() and in
src/process-unix.c:unix_open_network_stream(). It should not be
useful to make this change in either of those places.
Karl> Why should XEmacs care at all about network matters during
Karl> startup?
Those Who Know insist that this is a feature, and that you should fix
your network configuration.
--
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences Tel/fax: +81 (298) 53-5091
_________________ _________________ _________________ _________________
What are those straight lines for? "XEmacs rules."