From 57d86f72803c426ac3b5f67e0012f3f0dd29138a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 20 May 2014 21:38:35 +0200 Subject: reply signals to blueshift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/blueshift-tray.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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() -- cgit v1.2.3-70-g09d2