Ooookay. You are now, presumably, fresh from reading the original post about using AsyncGetCallTrace and the more recent post about how to use SIGPROF in C++ . The next obvious question is... Can I Register a Signal Handler in Java? Um... Kind of! There is an undocumented and unsupported interface called sun.misc.Signal present in most Java implementations. For those of you who have downloaded the JDK, the files live in /src/share/classes/sun/misc. If you import sun.misc.Signal and sun.misc.SignalHandler , you can define a signal handler like this: // Handles SIGHUP Signal.handle(new Signal("HUP"), new SignalHandler() { // Signal handler method public void handle(Signal signal) { System.out.println("Got signal" + signal); } }); You can raise a signal like this: Signal.raise(new Signal("HUP")); You can even register a native signal handler with the Signal.handle0 method (I'll leave that as an exercise for the reader). Having said that
Jeremy Manson's blog, which goes into great detail either about concurrency in Java, or anything else that the author happens to feel is interesting or relevant to the target audience.