From xemacs-m  Mon Apr  7 23:51:40 1997
Received: from mailbox2.ucsd.edu (mailbox2.ucsd.edu [132.239.1.54])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id XAA22466
	for <xemacs-beta@xemacs.org>; Mon, 7 Apr 1997 23:51:39 -0500 (CDT)
Received: from sdnp5.ucsd.edu (sdnp5.ucsd.edu [132.239.79.10]) by mailbox2.ucsd.edu (8.8.5/8.6.9) with SMTP id VAA20085 for <xemacs-beta@xemacs.org>; Mon, 7 Apr 1997 21:51:40 -0700 (PDT)
Received: by sdnp5.ucsd.edu (SMI-8.6/SMI-SVR4)
	id VAA02969; Mon, 7 Apr 1997 21:53:16 -0700
Sender: dmoore@sdnp5.ucsd.edu
To: xemacs-beta@xemacs.org
Subject: Re: C-g linux problem
References: <u94tdi9pqs.fsf@neal.ctd.comsat.com> <87k9meuqyn.fsf@sbt.net> <m2lo6um9hq.fsf@altair.xemacs.org>
X-Face: "oX;zS#-JU$-,WKSzG.1gGE]x^cIg!hW.dq>.f6pzS^A+(k!T|M:}5{_%>Io<>L&{hO7W4cicOQ|>/lZ1G(m%7iaCf,6Qgk0%%Bz7b2-W3jd0m_UG\Y;?]}4s0O-U)uox>P3JN)9cm]O\@,vy2e{`3pb!"pqmRy3peB90*2L
Mail-Copies-To: never
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
From: David Moore <dmoore@ucsd.edu>
Date: 07 Apr 1997 21:53:15 -0700
In-Reply-To: Steven L Baur's message of 07 Apr 1997 21:20:01 -0700
Message-ID: <rv3et2xghw.fsf@sdnp5.ucsd.edu>
Lines: 32
X-Mailer: Gnus v5.4.40/XEmacs 20.1(beta11)

Steven L Baur <steve@miranova.com> writes:

> Michael Harnois <mharnois@sbt.net> writes:
> 
> > Neal Becker <neal@ctd.comsat.com> writes:
> >> Anyone else find C-g broken on linux?
> 
> > Oh, yeah, we've talked about this a lot. I think David had an answer
> > for it, but as usual it was way over my head. :)
> 
> It's hanging in DNS lookup.  When I try the address `parc.power.net'
> in nslookup it hangs to, but C-c breaks out of it.
> 
> And for what it's worth it ignores C-g for a long time too for me too
> with libc-5.4.23 & resolver libs 4.9.5-REL.  It eventually gets the
> C-g so that must mean it's getting caught in one of those slow down
> interrupt regions.  Right?

Yup.  You'll have to wait up to 15 seconds for the C-g to be noticed.
You can use kill -INT to kick out faster.  But remember 1 ping, and only
1 ping with -INT.  Please check that it does notice your C-g within 20
seconds or so, as it does for Steve.

Possible ways around this:  Use non-blocking resolver calls if available
on the machine, have a subprocess to do name lookups, or don't connect
to machines whose name servers are down.

There probably is a good way to auto-detect if you have non-blocking
version of the resolver calls, and we could probably build our own
synchronous loop around that.  I don't know what those functions are
called, but I did see them in some resolver libraries a couple years ago
(so I'm sure they're in linux like everything else).

