From c8169e703374ab9efa4facd0a06994a85b6f87c2 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. --- bin/repoman | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bin/repoman') diff --git a/bin/repoman b/bin/repoman index 3938f49cf..dd2b774e8 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1,5 +1,5 @@ #!/usr/bin/python -O -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Next to do: dep syntax checking in mask files @@ -113,8 +113,10 @@ def err(txt): def exithandler(signum=None, frame=None): logging.fatal("Interrupted; exiting...") - sys.exit(1) - os.kill(0, signal.SIGKILL) + if signum is None: + sys.exit(1) + else: + sys.exit(128 + signum) signal.signal(signal.SIGINT,exithandler) -- cgit v1.2.3-1-g7c22