From e2a3237b4018e274350488868577c4d74a496b85 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 15 Jan 2011 13:22:15 -0800 Subject: When killed by signal, return 128 + signum. This is the same convention that bash uses for returncodes of processes that are killed by signals. --- pym/_emerge/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pym') diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 912fab51b..95174ccc0 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) -- cgit v1.2.3-1-g7c22