import icon as _icon
import os
import sys
+import signal
from os import path
from ibus import interface
from languagebar import LanguageBar
self.__ibus_icon = path.join(self.__icons_dir, "ibus.svg")
self.__setup_cmd = path.join(self.__prefix, "bin", "ibus-setup")
+ # hanlder signal
+ signal.signal(signal.SIGCHLD, self.__sigchld_cb)
+
# connect bus signal
self.__bus.connect("config-value-changed", self.__config_value_changed_cb)
self.__bus.connect("config-reloaded", self.__config_reloaded_cb)
self.__bus.kill()
else:
print >> sys.stderr, "Unknown command %s" % command
+
+ def __sigchld_cb(self, sig, sf):
+ pid = os.wait()
+ if self.__setup_pid == pid:
+ self.__setup_pid = 0
def __start_setup(self):
if self.__setup_pid != 0: