summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/main.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-15 13:22:15 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-16 12:33:20 -0800
commitc8169e703374ab9efa4facd0a06994a85b6f87c2 (patch)
treeb51d7e40fbf7915d046045422009ba1d0e8700ec /pym/_emerge/main.py
parentb512bca8bf2ef6c1ce57d134653bde909cd986f5 (diff)
downloadportage-c8169e703374ab9efa4facd0a06994a85b6f87c2.tar.gz
portage-c8169e703374ab9efa4facd0a06994a85b6f87c2.tar.bz2
portage-c8169e703374ab9efa4facd0a06994a85b6f87c2.zip
When killed by signal, return 128 + signum.
This is the same convention that bash uses for returncodes of processes that are killed by signals.
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r--pym/_emerge/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index e26aa6595..40266943f 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1,4 +1,4 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
@@ -1586,7 +1586,7 @@ def emerge_main():
signal.signal(signal.SIGINT, signal.SIG_IGN)
signal.signal(signal.SIGTERM, signal.SIG_IGN)
portage.util.writemsg("\n\nExiting on signal %(signal)s\n" % {"signal":signum})
- sys.exit(100+signum)
+ sys.exit(128 + signum)
signal.signal(signal.SIGINT, emergeexitsig)
signal.signal(signal.SIGTERM, emergeexitsig)