Send an explicit sighup from closeterm()

This commit is contained in:
Thomas Hurst 2008-12-24 03:31:39 +00:00
parent 09c23732af
commit 70e54005ee
2 changed files with 8 additions and 1 deletions

View File

@ -818,6 +818,7 @@ class Terminator:
dbg ("closeterm function called while in zoomed mode. Restoring previous layout before closing.")
self.toggle_zoom(widget, not self._maximised)
widget.sighup()
if self.remove(widget):
widget.destroy ()
return True

View File

@ -19,7 +19,7 @@
import pygtk
pygtk.require ("2.0")
import gobject, gtk, pango
import os, sys, subprocess, pwd, re
import os, signal, sys, subprocess, pwd, re
#import version details
from terminatorlib.version import *
@ -501,6 +501,12 @@ text/plain
err (_('Unable to start shell: ') + shell)
return (-1)
def sighup (self):
try:
os.kill(self._pid, signal.SIGHUP)
except OSError:
dbg('Unable to send SIGHUP to %d' % self._pid)
def get_cwd (self):
""" Return the current working directory of the subprocess.
This function requires OS specific behaviours