diff Python/pythonrun.c @ 12518:9e53a7112395 legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Thu, 27 Apr 2000 23:44:15 +0000
parents ec6b6ca5d111
children d7484a743354
line wrap: on
line diff
--- a/Python/pythonrun.c	Thu Apr 27 21:42:48 2000 +0000
+++ b/Python/pythonrun.c	Thu Apr 27 23:44:15 2000 +0000
@@ -242,7 +242,11 @@
 #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 */