The usual
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 @@
         _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 @@
         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()