Don't use SIGUSR1 under Jython, bug #424259.
authorZac Medico <zmedico@gentoo.org>
Mon, 2 Jul 2012 19:13:54 +0000 (12:13 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 2 Jul 2012 19:13:54 +0000 (12:13 -0700)
bin/ebuild
bin/ebuild-ipc.py
bin/emerge
pym/portage/tests/runTests

index 35cdc14532e1fb8b8f0bddbc8b774f4b57593116..65e5bef630ca052014b8884f80111d8182c73146 100755 (executable)
@@ -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
index 29d4c23c6029ea5ffa78db075816574d6949b039..3caf2d185693b467a4fb5fba1eaf19746d22d3fb 100755 (executable)
@@ -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(
index 6f69244be90a168c5a9e0fe9bfecc9061464a586..a9a56432c2360903af2f1f023ab62fa606369644 100755 (executable)
@@ -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
index 4c10087084183233959772fbb618261362d51104..91984a3a3f9b462971b92e01709f030e86c5662f 100755 (executable)
@@ -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