diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-07-02 12:13:54 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-07-02 12:13:54 -0700 |
commit | 7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1 (patch) | |
tree | 48dd3a5f00ab79057a11e8e6296afc3e99c8af70 /bin | |
parent | 77703d4f3660374068c275369670dcfe9c2f4131 (diff) | |
download | portage-7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1.tar.gz portage-7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1.tar.bz2 portage-7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1.zip |
Don't use SIGUSR1 under Jython, bug #424259.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild | 9 | ||||
-rwxr-xr-x | bin/ebuild-ipc.py | 11 | ||||
-rwxr-xr-x | bin/emerge | 11 |
3 files changed, 26 insertions, 5 deletions
diff --git a/bin/ebuild b/bin/ebuild index 35cdc1453..65e5bef63 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -4,6 +4,7 @@ from __future__ import print_function +import platform import signal import sys # This block ensures that ^C interrupts are handled quietly. @@ -26,7 +27,13 @@ except KeyboardInterrupt: def debug_signal(signum, frame): import pdb pdb.set_trace() -signal.signal(signal.SIGUSR1, debug_signal) + +if platform.python_implementation() == 'Jython': + debug_signum = signal.SIGUSR2 # bug #424259 +else: + debug_signum = signal.SIGUSR1 + +signal.signal(debug_signum, debug_signal) import imp import io diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py index 29d4c23c6..3caf2d185 100755 --- a/bin/ebuild-ipc.py +++ b/bin/ebuild-ipc.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2010-2011 Gentoo Foundation +# Copyright 2010-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # This is a helper which ebuild processes can use @@ -9,6 +9,7 @@ import errno import logging import os import pickle +import platform import select import signal import sys @@ -18,7 +19,13 @@ import traceback def debug_signal(signum, frame): import pdb pdb.set_trace() -signal.signal(signal.SIGUSR1, debug_signal) + +if platform.python_implementation() == 'Jython': + debug_signum = signal.SIGUSR2 # bug #424259 +else: + debug_signum = signal.SIGUSR1 + +signal.signal(debug_signum, debug_signal) # Avoid sandbox violations after python upgrade. pym_path = os.path.join(os.path.dirname( diff --git a/bin/emerge b/bin/emerge index 6f69244be..a9a56432c 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1,9 +1,10 @@ #!/usr/bin/python -# Copyright 2006-2011 Gentoo Foundation +# Copyright 2006-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function +import platform import signal import sys # This block ensures that ^C interrupts are handled quietly. @@ -26,7 +27,13 @@ except KeyboardInterrupt: def debug_signal(signum, frame): import pdb pdb.set_trace() -signal.signal(signal.SIGUSR1, debug_signal) + +if platform.python_implementation() == 'Jython': + debug_signum = signal.SIGUSR2 # bug #424259 +else: + debug_signum = signal.SIGUSR1 + +signal.signal(debug_signum, debug_signal) try: from _emerge.main import emerge_main |