transport threads should be daemon

Bug #343263 reported by James Bardin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
paramiko
Fix Released
High
Robey Pointer

Bug Description

Transport threads can cause a program to hang when exiting on an exception.
Creating the transport with self.setDaemon(True) during __init__ would allow the interpreter to exit if the main thread exits abnormally.

Robey Pointer (robey)
Changed in paramiko:
assignee: nobody → Robey Pointer (robey)
importance: Undecided → High
milestone: none → 1.7.5
status: New → Confirmed
status: Confirmed → Fix Committed
Robey Pointer (robey)
Changed in paramiko:
status: Fix Committed → Fix Released
Revision history for this message
John A Meinel (jameinel) wrote :

For people who have run into this, I found a slightly different workaround. Specifically calling:

 sys.exitfunc()

Before you actually exit the program seems to allow things to shutdown normally. I'm not sure why this is true, just that bzr wasn't effected by things like this because of using sys.exitfunc(), but if you manually imported bzrlib in the interpreter it would hang during exit if paramiko had been loaded/used.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.