emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs hangs when changing network while sleeping


From: joakim
Subject: Re: emacs hangs when changing network while sleeping
Date: Sun, 23 Jan 2011 00:46:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

address@hidden (Rémi 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. 

#/bin/sh
`lsof -n|grep emacs|grep nntp|sed "s/.*TCP\ \\([^:]*\\):.*->\\([^:].*\\):.*/  
export a=\\1 export b=\\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


-- 
Joakim Verona



reply via email to

[Prev in Thread] Current Thread [Next in Thread]