summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-10-17 11:10:45 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2013-10-17 11:10:45 (GMT)
commite4508eebb43bfc563192bb60a510d8d91cc6129d (patch)
tree6574abb99d08c912b2698617701e53b610a75a3f /Lib
parenta3cf1aa86446bbb8f14d29fb913349f895f4f1ea (diff)
downloadcpython-e4508eebb43bfc563192bb60a510d8d91cc6129d.zip
cpython-e4508eebb43bfc563192bb60a510d8d91cc6129d.tar.gz
cpython-e4508eebb43bfc563192bb60a510d8d91cc6129d.tar.bz2
Try strace instead of gdb to see what wedged child is doing.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/_test_multiprocessing.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index ac1b2a7..d2b9403 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -273,7 +273,10 @@ class _TestProcess(BaseTestCase):
@classmethod
def _test_terminate(cls):
+ print('signal.getsignal(SIGTERM) =', signal.getsignal(signal.SIGTERM))
+ print('starting sleep')
time.sleep(100)
+ print('finished sleep')
def test_terminate(self):
if self.TYPE == 'threads':
@@ -313,12 +316,11 @@ class _TestProcess(BaseTestCase):
except RuntimeError:
print('os.waitpid() =', os.waitpid(p.pid, os.WNOHANG))
import subprocess
- p = subprocess.Popen(['gdb', sys.executable, str(p.pid)],
- stdin=subprocess.PIPE)
try:
- p.communicate(b'bt 50', timeout=10)
+ subprocess.check_call(['strace', '-p', str(p.pid)],
+ timeout=10)
except subprocess.TimeoutExpired:
- p.kill()
+ pass
raise
finally:
signal.signal(signal.SIGALRM, old_handler)