From: Guido van Rossum Date: Thu, 19 Feb 1998 21:28:49 +0000 (+0000) Subject: Delete the 'exit' command from the Tcl interpreter -- it would allow X-Git-Tag: v1.5.1~638 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1c0d31565d3e8bce6d1a67fe0cdd029492ec973b;p=thirdparty%2FPython%2Fcpython.git Delete the 'exit' command from the Tcl interpreter -- it would allow users to exit Python without the normal precautions. (The can do this using os._exit() anyway, but at least that's documented.) --- diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 8d654a14b2f5..d06700d7686f 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -337,6 +337,9 @@ Tkapp_New(screenName, baseName, className, interactive) v->interp = Tcl_CreateInterp(); + /* Delete the 'exit' command, which can screw things up */ + Tcl_DeleteCommand(v->interp, "exit"); + if (screenName != NULL) Tcl_SetVar2(v->interp, "env", "DISPLAY", screenName, TCL_GLOBAL_ONLY);