Commits

mattip committed edf33ec

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

Comments (0)

Files changed (2)

pypy/module/signal/interp_signal.py

 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
 

pypy/module/signal/test/test_signal.py

         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