console: Don't wait for 'nc' to exit, just kill the process.

Certain nc versions don't handle disconnects very well or require specific
incompatible cli options to operate nicely, and a hung 'nc' connection can
lock up virt-manager. Just kill the tunnel process, rather than waitpid it.
This commit is contained in:
Cole Robinson 2010-02-11 09:32:05 -05:00
parent c02b8538e6
commit 494a93cccc

View File

@ -21,14 +21,17 @@
import gobject
import gtk
import gtk.glade
import libvirt
import logging
import traceback
import sys
import dbus
import gtkvnc
import os
import sys
import signal
import socket
import logging
import traceback
from virtManager.error import vmmErrorDialog
@ -533,7 +536,7 @@ class vmmConsolePages(gobject.GObject):
logging.debug("Shutting down tunnel PID %d FD %d" %
(self.vncTunnel[1], self.vncTunnel[0].fileno()))
self.vncTunnel[0].close()
os.waitpid(self.vncTunnel[1], 0)
os.kill(self.vncTunnel[1], signal.SIGKILL)
self.vncTunnel = None
def try_login(self, src=None):