Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5fc9c86

Browse files
committed
SIGTERM is no longer caught to call sys.exitfunc.
This change was made long ago but the documentation was never updated.
1 parent 2cafcbb commit 5fc9c86

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Doc/lib/libsignal.tex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ \section{\module{signal} ---
4242
\item
4343
Python installs a small number of signal handlers by default:
4444
\constant{SIGPIPE} is ignored (so write errors on pipes and sockets can be
45-
reported as ordinary Python exceptions), \constant{SIGINT} is translated
46-
into a \exception{KeyboardInterrupt} exception, and \constant{SIGTERM} is
47-
caught so that necessary cleanup (especially \code{sys.exitfunc}) can
48-
be performed before actually terminating. All of these can be
45+
reported as ordinary Python exceptions) and \constant{SIGINT} is translated
46+
into a \exception{KeyboardInterrupt} exception. All of these can be
4947
overridden.
5048

5149
\item

Doc/lib/libsys.tex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ \section{\module{sys} ---
122122
This value is not actually defined by the module, but can be set by
123123
the user (or by a program) to specify a clean-up action at program
124124
exit. When set, it should be a parameterless function. This function
125-
will be called when the interpreter exits in any way (except when a
126-
fatal error occurs: in that case the interpreter's internal state
127-
cannot be trusted).
125+
will be called when the interpreter exits. Note: the exit function
126+
is not called when the program is killed by a signal, when a Python
127+
fatal internal error is detected, or when \code{os._exit()} is called.
128128
\end{datadesc}
129129

130130
\begin{funcdesc}{getrefcount}{object}

0 commit comments

Comments
 (0)