[pypy-commit] pypy default: getsignalname(6) -> SIGABRT, not SIGIOT (strange synonym)

arigo noreply at buildbot.pypy.org
Wed Mar 25 11:04:53 CET 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r76558:016d3b84b7b0
Date: 2015-03-25 11:04 +0100
http://bitbucket.org/pypy/pypy/changeset/016d3b84b7b0/

Log:	getsignalname(6) -> SIGABRT, not SIGIOT (strange synonym)

diff --git a/testrunner/runner.py b/testrunner/runner.py
--- a/testrunner/runner.py
+++ b/testrunner/runner.py
@@ -101,7 +101,9 @@
     return 0
 
 def getsignalname(n):
-    for name, value in signal.__dict__.items():
+    # "sorted()" to pick a deterministic answer in case of synonyms.
+    # Also, getting SIGABRT is more understandable than SIGIOT...
+    for name, value in sorted(signal.__dict__.items()):
         if value == n and name.startswith('SIG'):
             return name
     return 'signal %d' % (n,)


More information about the pypy-commit mailing list