Rev 125: Call sys.exitfunc() before exiting. in

John Arbash Meinel john at
Thu Jul 9 17:28:13 BST 2009


revno: 125
revision-id: john at
parent: john at
committer: John Arbash Meinel <john at>
branch nick: win32
timestamp: Thu 2009-07-09 11:28:08 -0500
  Call sys.exitfunc() before exiting.
  For some reason, atexit() does bad things on win32.
  My best guess is that gc starts collecting objects *before* running the atexit hooks.
  Which causes some of the atexit functionality to die a horrible death.
  (My primary guess is something with paramiko.)
  Anyway, forcibly injecting sys.exitfunc() before exiting the process
  means that the process exits cleanly.
-------------- next part --------------
=== modified file 'tarmac-lander'
--- a/tarmac-lander	2009-05-12 02:10:05 +0000
+++ b/tarmac-lander	2009-07-09 16:28:08 +0000
@@ -1,8 +1,10 @@
 #!/usr/bin/env python
 # Copyright 2009 Paul Hummer - See LICENSE
+import sys
 from tarmac.bin import TarmacLander
 if __name__ == '__main__':
     script = TarmacLander()
+    # Run the exit functions
+    sys.exitfunc()

More information about the bazaar-commits mailing list