mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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.)
This commit is contained in:
parent
0001a11986
commit
1c0d31565d
1 changed files with 3 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue