From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: joakim@verona.se Newsgroups: gmane.emacs.devel Subject: Re: emacs hangs when changing network while sleeping Date: Sun, 23 Jan 2011 00:46:33 +0100 Message-ID: References: <8762th2len.fsf@sphax.lybrafox.lan> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1295740084 8456 80.91.229.12 (22 Jan 2011 23:48:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 Jan 2011 23:48:04 +0000 (UTC) Cc: emacs-devel@gnu.org To: hobbes@poukram.net (=?iso-8859-1?Q?R=E9mi?= Letot) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 23 00:47:59 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PgnBW-0004iI-2V for ged-emacs-devel@m.gmane.org; Sun, 23 Jan 2011 00:47:58 +0100 Original-Received: from localhost ([127.0.0.1]:53731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgnAe-00034b-IK for ged-emacs-devel@m.gmane.org; Sat, 22 Jan 2011 18:47:04 -0500 Original-Received: from [140.186.70.92] (port=56114 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgnAW-00034D-Q9 for emacs-devel@gnu.org; Sat, 22 Jan 2011 18:47:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgnAI-0005RP-Rd for emacs-devel@gnu.org; Sat, 22 Jan 2011 18:46:46 -0500 Original-Received: from iwfs.imcode.com ([82.115.149.64]:52906 helo=gate.verona.se) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgnAI-0005QW-Ed for emacs-devel@gnu.org; Sat, 22 Jan 2011 18:46:42 -0500 Original-Received: from chopper (IDENT:1005@localhost [127.0.0.1]) by gate.verona.se (8.13.4/8.11.4) with ESMTP id p0MNkXOC014509; Sun, 23 Jan 2011 00:46:34 +0100 In-Reply-To: <8762th2len.fsf@sphax.lybrafox.lan> (=?iso-8859-1?Q?=22R=E9mi?= Letot"'s message of "Sat, 22 Jan 2011 13:05:52 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134853 Archived-At: hobbes@poukram.net (R=E9mi Letot) writes: > Hello, > > when I change network with my laptop sleeping (typical when I commute > between work and home), my whole emacs session often freezes if gnus is > there (which is always). > > Not so long ago I just had to kill the openssl processes, which abruptly > interrupted the connections, and gave me back my emacs. > > Now that ssl is handled by emacs itself, I have no external process to > kill. And C-g doesn't help, all keystrokes I do seem to accumulate in > some buffer and are all processed when emacs resurfaces. And it can stay > frozen quite some time. > > Besides quitting gnus before I commute (which I almost always forget) > and killing emacs (which is "Not Good"), is there a way to stop this > from happening ? Shouldn't C-g always work ? > > Thanks, This happens for me too. I have the following workaround script. Basically it finds the ip of an open nntp session that is hanging due to local interface change, and makes a dummy lookalike interface on the loopback interface. Emacs is then able to determine that the interface is dead and can recover.=20 #/bin/sh `lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*= / export a=3D\\1 export b=3D\\2/"` echo $a $b ifconfig lo:1 $a ifconfig lo:2 $b echo press enter when emacs is alive read ifconfig lo:1 down ifconfig lo:2 down --=20 Joakim Verona