[Gllug] Disconnected ssh sessions and pseudo-terminals
Alistair Mann
gllug at lgeezer.net
Tue Oct 28 11:20:18 UTC 2008
Ziya Suzen wrote:
> Hi there
>
> Sometimes I hate my ADSL provider. Connections keep dropping
> and I loose my SSH connections. What I usually do is to ignore
> them and open new SSH sessions. However it gets annoying
> when you have an editor already opened on a file, you 'ps' it
> and see it opened there, but you can't exit the editor (vi) or take
> control of the now not-used pts.
>
> I have tried a few tricks without any luck:
>
> Exit the Editor:
> # echo -n ^[ >> /dev/pts/1
> # echo -n :x >> /dev/pts/1
>
> (Note:key combination typed for escape: ctrl+v, Esc)
>
> And hopelessly tried 'screen' to get to the orphan terminal :(
>
> Any ideas?
Vi will gracefully terminate if you send it a signal:
$ kill -SIGHUP <process id>
Graceful includes preserving whatever's in the editor but unsaved.
That help?
--
Alistair Mann
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list