leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: Is there code for X?

Topic: Running code on ctrl+c before exit


Michael MacLeod (Aug 15 2025 at 03:38):

I want to display a message when my program is killed by someone pressing ctrl+c in the terminal. Is there any way to do this without wrapping my executable in a shell script with a ctrl+c trap?


Last updated: Dec 20 2025 at 21:32 UTC

Theme Simple by wildflame © 2016 Powered by jekyll