#include void handler(int) {} void install() { struct sigaction a{}; a.sa_handler = handler; sigaction(SIGSEGV, &a, nullptr); }