Alexander Southgate wrote: > After a bit of searching we came across Fazal Majid's useful > extension, threadframe > (http://www.majid.info/mylos/stories/2004/06/10/threadframe.html) > which exports thread stack frames as a dict. > > If you've used Java much you know that sending SIGQUIT to a Java > process will dump all thread stack frames to stderr. We wanted to > mimic this behavior in Python and so patched the ThreadedAppServer > class to catch SIGQUIT, dump threads to stdout, and continue on its > merry way. > > Attached is the patch to Webware 0.9.1's ThreadedAppServer. Obviously > it requires the alpha/beta (but seemingly stable) threadframe package, > so caveat emptor, etc. etc.
I think that is very useful and I have applied your patch to the current trunk. One thing I changed is that the signal handler is only installed if the threadframe module is installed (otherwise, you'll get the default behavior). I also made this work on Windows by using SIGBREAK here. So on Windows, you can shutdown/restart with Ctrl-C and you can now get a thread dump with Ctrl-Break. However, I have one problem under Windows: Hitting Ctrl-Break does only work one time. For some reason, Windows ignores subsequent Ctrl-Breaks. Does anybody have an explanation for that behavior? -- Christoph ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Webware-discuss mailing list Webware-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-discuss