Guido van Rossum 05f9dce34f Moved clear_carefully() to _PyModule_Clear() in moduleobject.c
(modified) and use that.

Some differences in the cleanup algorithm:

- Clear __main__ before the other modules.

- Delete more sys variables: including ps1, ps2, exitfunc, argv, and
even path -- this will prevent new imports!

- Restore stdin, stdout, stderr from __stdin__, __stdout__,
__stderr__, effectively deleting hooks that the user might have
installed -- so their (the hooks') destructors will run.
1998-02-19 20:58:44 +00:00
..
1996-10-25 14:44:06 +00:00
1996-10-25 14:44:06 +00:00
1997-07-19 19:48:41 +00:00
1996-10-25 14:44:06 +00:00
1997-09-05 07:33:22 +00:00
1997-07-19 19:48:41 +00:00
1997-07-19 19:48:41 +00:00
1997-05-07 23:51:07 +00:00
1996-08-29 18:10:41 +00:00
1997-09-05 07:33:22 +00:00
1998-02-06 22:27:24 +00:00
1996-08-29 18:10:30 +00:00
1997-11-22 21:53:48 +00:00
1997-11-22 21:53:48 +00:00