ofExit system halt

Hello

Is posible to detect in a raspberry when its going to halt, in order to call a function to stop a watchdog? When the system halt its ofExit executed?

Thanks

you have an exit method in ofApp that is called when that happens also there’s an exit event in ofEvents()

perfect, thanks!!!