1. Pypy
  2. Untitled project
  3. pypy

Commits

mattip  committed edf33ec

make sure CTR_* signals exist in windows, they were masked by SG_DFL and SIG_IGN

  • Participants
  • Parent commits 7f954ee
  • Branches default

Comments (0)

Files changed (2)

File pypy/module/signal/interp_signal.py

View file
 def setup():
     for key, value in cpy_signal.__dict__.items():
         if (key.startswith('SIG') or key.startswith('CTRL_')) and \
-                is_valid_int(value):
+                is_valid_int(value) and \
+                key != 'SIG_DFL' and key != 'SIG_IGN':
             globals()[key] = value
             yield key
 

File pypy/module/signal/test/test_signal.py

View file
         cls.w_signal = space.appexec([], "(): import signal; return signal")
 
     def test_exported_names(self):
+        import os
         self.signal.__dict__   # crashes if the interpleveldefs are invalid
+        if os.name == 'nt':
+            self.signal.CTRL_BREAK_EVENT
+            self.signal.CTRL_C_EVENT
 
     def test_basics(self):
         import types, os