]> granicus.if.org Git - python/commitdiff
Closes #1215: document better why it is not a good idea to catch e.g. SIGSEGV and...
authorGeorg Brandl <georg@python.org>
Sun, 6 Oct 2013 19:22:42 +0000 (21:22 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 6 Oct 2013 19:22:42 +0000 (21:22 +0200)
Patch by Martin Pool.

Doc/library/signal.rst
Misc/ACKS

index 2a472fe57a4e762105dce21271d81e50e875170f..84e283683d07fcd1cf3c214a9284fee3cd05e28f 100644 (file)
@@ -36,7 +36,11 @@ at a later point(for example at the next :term:`bytecode` instruction).
 This has consequences:
 
 * It makes little sense to catch synchronous errors like :const:`SIGFPE` or
-  :const:`SIGSEGV`.
+  :const:`SIGSEGV` that are caused by an invalid operation in C code.  Python
+  will return from the signal handler to the C code, which is likely to raise
+  the same signal again, causing Python to apparently hang.  From Python 3.3
+  onwards, you can use the :mod:`faulthandler` module to report on synchronous
+  errors.
 
 * A long-running calculation implemented purely in C (such as regular
   expression matching on a large body of text) may run uninterrupted for an
index 400f5288d16269bb90a63a052efe39c8872e12ec..0a49abf227cce8d94691fb23a85a8385b9ba78ac 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -974,6 +974,7 @@ Oleg Plakhotnyuk
 Remi Pointel
 Guilherme Polo
 Michael Pomraning
+Martin Pool
 Iustin Pop
 Claudiu Popa
 John Popplewell