Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python signal don't work even on Cygwin?

Python signal doesn't seem to work on Windows even if I run the python script inside Cygwin. I'm getting the AttributeError: 'module' object has no attribute SIGALRM

Is there a way to go around this on Windows. I'm just running the example at the end of http://docs.python.org/2/library/signal.html

like image 742
ToniAz Avatar asked May 04 '13 06:05

ToniAz


1 Answers

SIGALRM doesn't work in Windows. From the documentation:

On Windows, signal() can only be called with SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, or SIGTERM. A ValueError will be raised in any other case.

This question addresses the topic of getting a SIGALRM equivalent in Windows. And this question is also similar.

like image 69
tiago Avatar answered Sep 17 '22 05:09

tiago