[pypy-svn] r37528 - pypy/dist/pypy/jit/codegen/demo
mwh at codespeak.net
mwh at codespeak.net
Mon Jan 29 13:34:58 CET 2007
Author: mwh
Date: Mon Jan 29 13:34:57 2007
New Revision: 37528
Modified:
pypy/dist/pypy/jit/codegen/demo/support.py
Log:
report signal name, thanks agurney
Modified: pypy/dist/pypy/jit/codegen/demo/support.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/demo/support.py (original)
+++ pypy/dist/pypy/jit/codegen/demo/support.py Mon Jan 29 13:34:57 2007
@@ -46,6 +46,8 @@
if run_in_subprocess:
def runfp(fp, *args):
import signal, os
+ sigs = dict([(value, name) for name, value in signal.__dict__.items()
+ if name.startswith('SIG')])
p2cread, p2cwrite = os.pipe()
pid = os.fork()
if not pid:
@@ -66,7 +68,7 @@
if sig == signal.SIGALRM:
return "HUNG?"
else:
- return "CRASHED (signal %s)"%(sig,)
+ return "CRASHED (caught %s)"%(sigs.get(sig, sig),)
else:
def runfp(fp, *args):
return fp(*args)
More information about the Pypy-commit
mailing list