From c844184f9f98d29e64df8a523cda3882c5b8a40b Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 19 Apr 2012 09:18:05 +0100 Subject: [PATCH] Clear up a signal when closing a terminal and add some debugging --- terminatorlib/terminal.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 9c3f930f..5b06d074 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -198,13 +198,16 @@ class Terminal(gtk.VBox): def close(self): """Close ourselves""" - dbg('Terminal::close: emitting close-term') + dbg('close: called') + self.cnxids.remove_signal(self.vte, 'child-exited') self.emit('close-term') try: + dbg('close: killing %d' % self.pid) os.kill(self.pid, signal.SIGHUP) - except: + except Exception, ex: # We really don't want to care if this failed. Deep OS voodoo is # not what we should be doing. + dbg('os.kill failed: %s' % ex) pass def create_terminalbox(self):