| |
Calling print in a Python signal handler is generally safe, but can cause a RuntimeError under extreme circumstances when signals arrive in rapid succession and interrupt an ongoing print operation due to Python's unexpectedly reentrant signal handlers. While a stress test demonstrates this vulnerability, real-world programs are unlikely to encounter such conditions, and the resulting exception is preferable to the deadlocks and data corruption possible in C signal handlers.
Read Full Article →
← More Tech news