dmwm/WMCore — pull request #3986 by PerilousApricot (2012-07-31 20:20:06+00:00)
Title: Refines how to trap os._exit in testing mode

Obnoxiously, cherrypy throws os._exit if a worker thread hits an error like the socket is already bound. That's, of course, bad for testing because os._exit blows away the interpreter which keeps nose from doing things like continuing to the next test or writing the xml file out. But, if you don't kill the thread, then the process will have spare children hanging out, which will make the interpreter never exit. This patch detects if worker threads are stuck and will start killing them with prejudice.

The obnoxious thing it's sorta racy to trigger this cherrypy stuff, so I'm not 100% it worked, but I ran it like 5 times and it didn't hang, so, I guess that's good enough :/