Fork me on GitHub

How to prevent Ctrl-C from quitting clj? I'm too used to repl-y's meaning of Ctrl-C (which interrupts eval OR discards current unsubmitted input but never quits the repl)

Alex Miller (Clojure team)15:01:10

I think that's the default behavior for a Java process (default signal handler)

Alex Miller (Clojure team)15:01:21

so you actually would need to install a new signal handler


thanks, I'll do that!

Alex Miller (Clojure team)15:01:36

there is actually a thing in clojure.repl I think that does that

Alex Miller (Clojure team)15:01:50


Alex Miller (Clojure team)15:01:10

at the very least, that's something to look at

👍 3
Alex Miller (Clojure team)15:01:18

the signal handler stuff is a little weird in that it's a very old sun.misc interface. Java made a big push to eradicate all of those a while back but at the time they had no replacement way to do this. afaik, they still don't.


:) thanks for all the info (clojure.repl/set-break-handler! identity) was quite satisfactory