diff options
author | Guido van Rossum <guido@python.org> | 2000-09-01 19:25:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-09-01 19:25:51 (GMT) |
commit | 8d691c842289cf4453f282637765f07113a7cc17 (patch) | |
tree | 3a7819d53d7578cf728d3bcfecba7daebb6981db /Lib/dos-8x3/threadin.py | |
parent | 29201d490511b2af863e07fdf5cb247fc9117c2f (diff) | |
download | cpython-8d691c842289cf4453f282637765f07113a7cc17.zip cpython-8d691c842289cf4453f282637765f07113a7cc17.tar.gz cpython-8d691c842289cf4453f282637765f07113a7cc17.tar.bz2 |
The usual
Diffstat (limited to 'Lib/dos-8x3/threadin.py')
-rw-r--r-- | Lib/dos-8x3/threadin.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Lib/dos-8x3/threadin.py b/Lib/dos-8x3/threadin.py index fb2eb21..4921f0e 100644 --- a/Lib/dos-8x3/threadin.py +++ b/Lib/dos-8x3/threadin.py @@ -462,11 +462,8 @@ class _MainThread(Thread): _active_limbo_lock.acquire() _active[_get_ident()] = self _active_limbo_lock.release() - try: - self.__oldexitfunc = _sys.exitfunc - except AttributeError: - self.__oldexitfunc = None - _sys.exitfunc = self.__exitfunc + import atexit + atexit.register(self.__exitfunc) def _set_daemon(self): return 0 @@ -480,10 +477,6 @@ class _MainThread(Thread): while t: t.join() t = _pickSomeNonDaemonThread() - if self.__oldexitfunc: - if __debug__: - self._note("%s: calling exit handler", self) - self.__oldexitfunc() if __debug__: self._note("%s: exiting", self) self._Thread__delete() |