Merge lp:~mvo/aptdaemon/use-glib-unix-signal-handling into lp:aptdaemon

Proposed by Michael Vogt
Status: Merged
Merged at revision: 875
Proposed branch: lp:~mvo/aptdaemon/use-glib-unix-signal-handling
Merge into: lp:aptdaemon
Diff against target: 25 lines (+6/-3)
1 file modified
aptdaemon/core.py (+6/-3)
To merge this branch: bzr merge lp:~mvo/aptdaemon/use-glib-unix-signal-handling
Reviewer Review Type Date Requested Status
Martin Pitt (community) Approve
Review via email: mp+136626@code.launchpad.net

Description of the change

Use glib unix signal handling

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'aptdaemon/core.py'
--- aptdaemon/core.py 2012-11-26 10:29:31 +0000
+++ aptdaemon/core.py 2012-11-28 11:26:21 +0000
@@ -1395,8 +1395,11 @@
1395 bus -- the D-Bus to connect to (defaults to the system bus)1395 bus -- the D-Bus to connect to (defaults to the system bus)
1396 """1396 """
1397 log.info("Initializing daemon")1397 log.info("Initializing daemon")
1398 signal.signal(signal.SIGQUIT, self._sigquit)1398 # glib does not support SIGQUIT
1399 signal.signal(signal.SIGTERM, self._sigquit)1399 #GLib.unix_signal_add_full(
1400 # GLib.PRIORITY_HIGH, signal.SIGQUIT, self._sigquit, None)
1401 GLib.unix_signal_add_full(
1402 GLib.PRIORITY_HIGH, signal.SIGTERM, self._sigquit, None)
1400 # Decrease the priority of the daemon to avoid blocking UI1403 # Decrease the priority of the daemon to avoid blocking UI
1401 os.nice(5)1404 os.nice(5)
1402 self.options = options1405 self.options = options
@@ -2148,7 +2151,7 @@
2148 else:2151 else:
2149 return {}2152 return {}
21502153
2151 def _sigquit(self, signum, frame):2154 def _sigquit(self, data):
2152 """Internal callback for the quit signal."""2155 """Internal callback for the quit signal."""
2153 self.Quit(None)2156 self.Quit(None)
21542157

Subscribers

People subscribed via source and target branches

to status/vote changes: