Kaydet (Commit) c377fe2b authored tarafından Georg Brandl's avatar Georg Brandl

Closes #1215: document better why it is not a good idea to catch e.g. SIGSEGV…

Closes #1215: document better why it is not a good idea to catch e.g. SIGSEGV and refer to faulthandler.

Patch by Martin Pool.
üst a072de14
...@@ -36,7 +36,11 @@ at a later point(for example at the next :term:`bytecode` instruction). ...@@ -36,7 +36,11 @@ at a later point(for example at the next :term:`bytecode` instruction).
This has consequences: This has consequences:
* It makes little sense to catch synchronous errors like :const:`SIGFPE` or * 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 * A long-running calculation implemented purely in C (such as regular
expression matching on a large body of text) may run uninterrupted for an expression matching on a large body of text) may run uninterrupted for an
......
...@@ -974,6 +974,7 @@ Oleg Plakhotnyuk ...@@ -974,6 +974,7 @@ Oleg Plakhotnyuk
Remi Pointel Remi Pointel
Guilherme Polo Guilherme Polo
Michael Pomraning Michael Pomraning
Martin Pool
Iustin Pop Iustin Pop
Claudiu Popa Claudiu Popa
John Popplewell John Popplewell
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment