summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-27 23:44:15 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-27 23:44:15 (GMT)
commiteca47847810f75c57f09241bb92d19e1cc90fa7e (patch)
tree1ae408b2e3a3fce3399d66f3380d1141c17e1248 /Python
parent7c4f96f44281d652fda7069397dced4f6af6353d (diff)
downloadcpython-eca47847810f75c57f09241bb92d19e1cc90fa7e.zip
cpython-eca47847810f75c57f09241bb92d19e1cc90fa7e.tar.gz
cpython-eca47847810f75c57f09241bb92d19e1cc90fa7e.tar.bz2
Mark Hammond: For Windows debug builds, we now only offer to dump
remaining object references if the environment variable PYTHONDUMPREFS exists. The default behaviour caused problems for background or otherwise invisible processes that use the debug build of Python.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 0ae15fa..17d569d 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -242,7 +242,11 @@ Py_Finalize()
#endif
#ifdef Py_TRACE_REFS
- if (_Py_AskYesNo("Print left references?")) {
+ if (
+#ifdef MS_WINDOWS /* Only ask on Windows if env var set */
+ getenv("PYTHONDUMPREFS") &&
+#endif /* MS_WINDOWS */
+ _Py_AskYesNo("Print left references?")) {
_Py_PrintReferences(stderr);
}
#endif /* Py_TRACE_REFS */