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 /pym | |
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 'pym')
-rwxr-xr-x | pym/portage/tests/runTests | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests index 4c1008708..91984a3a3 100755 --- a/pym/portage/tests/runTests +++ b/pym/portage/tests/runTests @@ -1,18 +1,25 @@ #!/usr/bin/python -Wd # runTests.py -- Portage Unit Test Functionality -# Copyright 2006 Gentoo Foundation +# Copyright 2006-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import os, sys import os.path as osp import grp +import platform import pwd import signal 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) # Pretend that the current user's uid/gid are the 'portage' uid/gid, # so things go smoothly regardless of the current user and global |