From 8d8681e63f4ca70d657bf8655a79aeefa5d5c646 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 25 Jan 2010 12:35:34 +0000 Subject: [PATCH] This makes us very UNIX dependent (as if we weren't before anyway), but we now specifically send a SIGHUP to the child of a terminal when that terminal is explicitly close()d --- terminatorlib/notebook.py | 1 - terminatorlib/terminal.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 584d14d6..5ec3f9c0 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -200,7 +200,6 @@ class Notebook(Container, gtk.Notebook): while len(objects) > 0: descendant = objects.pop() descendant.close() - # FIXME: Is this mainloop iterations stuff necessary? while gtk.events_pending(): gtk.main_iteration() return diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 889615ba..5be090b3 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -5,6 +5,7 @@ import sys import os +import signal import pygtk pygtk.require('2.0') import gtk @@ -164,6 +165,7 @@ class Terminal(gtk.VBox): """Close ourselves""" dbg('Terminal::close: emitting close-term') self.emit('close-term') + os.kill(self.pid, signal.SIGHUP) def create_terminalbox(self): """Create a GtkHBox containing the terminal and a scrollbar"""