I have the following code:
(ns test-hook.core) (defn -main [] (.addShutdownHook (Runtime/getRuntime) (Thread. #(print
Have you tried running it with trampoline?
lein trampoline run
Seems to work for me.
AFAIK "lein trampoline" doesn't nest the JVM, so your Ctrl-C isn't caught by leiningen, but by your code.