Mark Hammond: For Windows debug builds, we now only offer to dump
authorGuido van Rossum <guido@python.org>
Thu, 27 Apr 2000 23:44:15 +0000 (23:44 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 27 Apr 2000 23:44:15 +0000 (23:44 +0000)
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.

Python/pythonrun.c

index 0ae15fafa268f706447d04b65af9c979a1680398..17d569d78f636d49df16053c67c44e1f1315db2a 100644 (file)
@@ -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 */