summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-27 23:44:15 +0000
committerGuido van Rossum <guido@python.org>2000-04-27 23:44:15 +0000
commit7defe2918b78d96632f4e1cf98f924249a43fdce (patch)
tree83f9c21a64e1e9e5da0d137df7d5d42f7a1909f0 /Python/pythonrun.c
parent5f83ebbf64617a1ff49102177a85e035426c19b8 (diff)
downloadcpython-7defe2918b78d96632f4e1cf98f924249a43fdce.tar.gz
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/pythonrun.c')
-rw-r--r--Python/pythonrun.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 0ae15fafa2..17d569d78f 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 */