aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-20 21:38:35 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-20 21:38:35 +0200
commit57d86f72803c426ac3b5f67e0012f3f0dd29138a (patch)
treee2e0b6cb0046b135661f119ca3ed0d2c9a6d66e7
parentupdate dist (diff)
downloadblueshift-tray-57d86f72803c426ac3b5f67e0012f3f0dd29138a.tar.gz
blueshift-tray-57d86f72803c426ac3b5f67e0012f3f0dd29138a.tar.bz2
blueshift-tray-57d86f72803c426ac3b5f67e0012f3f0dd29138a.tar.xz
reply signals to blueshift
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rwxr-xr-xsrc/blueshift-tray.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/blueshift-tray.py b/src/blueshift-tray.py
index cb5118e..fbc9abb 100755
--- a/src/blueshift-tray.py
+++ b/src/blueshift-tray.py
@@ -157,6 +157,10 @@ signal.signal(signal.SIGCHLD, process_quit)
process = subprocess.Popen(['blueshift'] + sys.argv[1:], stdout = sys.stdout, stderr = sys.stderr)
last_time = time.time() - 1
+signal_relay = lambda signo, _frame : os.kill(process.pid, signal)
+for signo in (signal.SIGTERM, signal.SIGINT, signal.SIGHUP, signal.SIGUSR1, signal.SIGUSR2):
+ signal.signal(signo, signal_relay)
+
try:
icon = gtk.StatusIcon()