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

This commit is contained in:
Chris Jones 2010-01-25 12:35:34 +00:00
parent 60983e3584
commit 8d8681e63f
2 changed files with 2 additions and 1 deletions

View File

@ -200,7 +200,6 @@ class Notebook(Container, gtk.Notebook):
while len(objects) > 0: while len(objects) > 0:
descendant = objects.pop() descendant = objects.pop()
descendant.close() descendant.close()
# FIXME: Is this mainloop iterations stuff necessary?
while gtk.events_pending(): while gtk.events_pending():
gtk.main_iteration() gtk.main_iteration()
return return

View File

@ -5,6 +5,7 @@
import sys import sys
import os import os
import signal
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
import gtk import gtk
@ -164,6 +165,7 @@ class Terminal(gtk.VBox):
"""Close ourselves""" """Close ourselves"""
dbg('Terminal::close: emitting close-term') dbg('Terminal::close: emitting close-term')
self.emit('close-term') self.emit('close-term')
os.kill(self.pid, signal.SIGHUP)
def create_terminalbox(self): def create_terminalbox(self):
"""Create a GtkHBox containing the terminal and a scrollbar""" """Create a GtkHBox containing the terminal and a scrollbar"""