--- redshift-1.7.orig/src/gtk-redshift/statusicon.py 2010-10-18 02:12:14.000000000 +0200 +++ redshift-1.7/src/gtk-redshift/statusicon.py 2012-07-18 17:07:41.043944220 +0200 @@ -24,7 +24,7 @@ ''' import sys, os -import subprocess, signal +import signal, prctl import gettext import pygtk @@ -46,10 +46,13 @@ gettext.textdomain('redshift') _ = gettext.gettext - # Start redshift with arguments from the command line - args = sys.argv[1:] - args.insert(0, os.path.join(defs.BINDIR, 'redshift')) - process = subprocess.Popen(args) + process = os.fork() + if process == 0: + # Start redshift with arguments from the command line + prctl.set_pdeathsig(signal.SIGTERM) + args = sys.argv[1:] + args.insert(0, os.path.join(defs.BINDIR, 'redshift')) + os.execv(args[0], args) try: if appindicator: @@ -65,7 +68,7 @@ status_icon.set_tooltip('Redshift') def toggle_cb(widget, data=None): - process.send_signal(signal.SIGUSR1) + os.kill(process, signal.SIGUSR1) if appindicator: if indicator.get_icon() == 'redshift-status-on': indicator.set_icon('redshift-status-off') @@ -128,7 +131,7 @@ sys.exit(-1) # Add watch on child process - glib.child_watch_add(process.pid, child_cb) + glib.child_watch_add(process, child_cb) # Run main loop gtk.main() @@ -137,7 +140,3 @@ # Ignore user interruption pass - finally: - # Always terminate redshift - process.terminate() - process.wait() --- redshift-1.7.orig/debian/control 2012-03-03 02:13:08.000000000 +0100 +++ redshift-1.7/debian/control 2012-07-18 17:11:58.162729794 +0200 @@ -24,7 +24,7 @@ Package: gtk-redshift Architecture: all -Depends: redshift (>= ${source:Version}), ${misc:Depends}, python (>= 2.6.6-3~), python-gtk2, python-xdg +Depends: redshift (>= ${source:Version}), ${misc:Depends}, python (>= 2.6.6-3~), python-gtk2, python-xdg, python-prctl Description: Adjusts the color temperature of your screen with GTK+ integration The color temperature is set according to the position of the sun. A different color temperature is set during night and daytime. During