Rev 125: Call sys.exitfunc() before exiting. in http://bazaar.launchpad.net/~jameinel/tarmac/win32
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 9 17:28:13 BST 2009
At http://bazaar.launchpad.net/~jameinel/tarmac/win32
------------------------------------------------------------
revno: 125
revision-id: john at arbash-meinel.com-20090709162808-r4rjdqr080dsl029
parent: john at arbash-meinel.com-20090709160256-bwqz1a8iv5wqexz2
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: win32
timestamp: Thu 2009-07-09 11:28:08 -0500
message:
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()
script.main()
-
+ # Run the exit functions
+ sys.exitfunc()
More information about the bazaar-commits
mailing list