aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-11-20 11:16:46 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-11-20 11:16:46 -0700
commit94e8cc68125a285d57200cf331bdc5d635aacde4 (patch)
tree09ace8909ce60c699b9e6c48390d87ad53166af2 /examples
parentba159dbb277adf7532e4e2f09dcfa461084c9455 (diff)
parentbf26eec507fed8524368e523eadc5b798a40e870 (diff)
Merge branch 'dev/fix-uzbl-tabbed'
Conflicts: Makefile
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/data/scripts/uzbl-tabbed17
1 files changed, 2 insertions, 15 deletions
diff --git a/examples/data/scripts/uzbl-tabbed b/examples/data/scripts/uzbl-tabbed
index 42837d3..9e5d715 100755
--- a/examples/data/scripts/uzbl-tabbed
+++ b/examples/data/scripts/uzbl-tabbed
@@ -158,7 +158,7 @@ import atexit
import types
from gobject import io_add_watch, source_remove, timeout_add, IO_IN, IO_HUP
-from signal import signal, SIGTERM, SIGINT, SIGCHLD
+from signal import signal, SIGTERM, SIGINT
from optparse import OptionParser, OptionGroup
from traceback import print_exc
@@ -536,7 +536,6 @@ class UzblTabbed:
self._timers = {}
self._buffer = ""
self._killed = False
- self._processes = []
# A list of the recently closed tabs
self._closed = []
@@ -656,9 +655,6 @@ class UzblTabbed:
# Catch keyboard interrupts
signal(SIGINT, lambda signum, stack_frame: self.terminate(SIGINT))
- # Catch SIGCHLD
- signal(SIGCHLD, lambda signum, stack_frame: self.join_children())
-
try:
gtk.main()
@@ -678,15 +674,6 @@ class UzblTabbed:
raise
-
- def join_children(self):
- '''Find and remove zombie children processes.'''
-
- for p in self._processes:
- if p.poll() is not None:
- self._processes.remove(p)
-
-
def terminate(self, termsig=None):
'''Handle termination signals and exit safely and cleanly.'''
@@ -1017,7 +1004,7 @@ class UzblTabbed:
cmd = ['uzbl-browser', '-n', name, '-s', str(sid),
'--connect-socket', self.socket_path, '--uri', uri]
- self._processes += [subprocess.Popen(cmd)] # TODO: do i need close_fds=True ?
+ gobject.spawn_async(cmd, flags=gobject.SPAWN_SEARCH_PATH)
uzbl = UzblInstance(self, tab, name, uri, title, switch)
SocketClient.instances_queue[name] = uzbl