Skip to content

Commit 6f19384

Browse files
committed
Use PyErr_FormatUnraisable to show signals.
1 parent ea1da77 commit 6f19384

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Python/pylifecycle.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include "pycore_weakref.h" // _PyWeakref_GET_REF()
3838

3939
#include "opcode.h"
40+
#include "pyerrors.h"
4041

4142
#include <locale.h> // setlocale()
4243
#include <stdlib.h> // getenv()
@@ -3501,7 +3502,7 @@ wait_for_interp_references(PyInterpreterState *interp)
35013502
wait_ns = Py_MIN(wait_ns, wait_max);
35023503

35033504
if (PyErr_CheckSignals()) {
3504-
PyErr_Print();
3505+
PyErr_FormatUnraisable("Exception ignored while waiting on interpreter shutdown");
35053506
/* The user CTRL+C'd us, bail out without waiting for a reference
35063507
count of zero.
35073508

0 commit comments

Comments
 (0)