Catching signals, best practice?


#1

My application can run with and without a gui. In the latter case, I need to catch interrupt/signals like SIGINT, since the user will quit the app by pressing Ctrl-C and I need to save state etc clean up before exit.

Is there a best practice to set this up in JUCE, or do I just hack away with my own platform dependent sigaction stuff?

Grateful for any hints and tips!


#2

I think you’re on your own with that, it’s not really something that lends itself to a cross-platform solution.


#3

Case in point:

Windows Structured Exception Handling (SEH)


#4

Ok, thought as much. Thanks both of you!