From b4ce1fc31be5614d527d77c55018281ebbcd70ab Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Mon, 30 Nov 2015 03:18:29 +0000 Subject: Issue #5319: New Py_FinalizeEx() API to exit with status 120 on failure --- Doc/library/sys.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Doc/library/sys.rst') diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index f6325cc8c1..97b5899a64 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -255,7 +255,7 @@ always available. (defaulting to zero), or another type of object. If it is an integer, zero is considered "successful termination" and any nonzero value is considered "abnormal termination" by shells and the like. Most systems require it to be - in the range 0-127, and produce undefined results otherwise. Some systems + in the range 0--127, and produce undefined results otherwise. Some systems have a convention for assigning specific meanings to specific exit codes, but these are generally underdeveloped; Unix programs generally use 2 for command line syntax errors and 1 for all other kind of errors. If another type of @@ -268,6 +268,11 @@ always available. the process when called from the main thread, and the exception is not intercepted. + .. versionchanged:: 3.6 + If an error occurs in the cleanup after the Python interpreter + has caught :exc:`SystemExit` (such as an error flushing buffered data + in the standard streams), the exit status is changed to 120. + .. data:: flags -- cgit v1.2.1