

#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
#include <signal.h>
#include <stdlib.h>

void myhandler(int signal) {
    printf("Ha ha. I won't die\n");
}

int main() {    

    signal(SIGINT, myhandler);
    signal(SIGTERM, myhandler);
    signal(SIGSEGV, myhandler);

    int *p = NULL;
    *p = 34;

    while (true) {
        printf("Just wasting cycles. %d\n", getpid());
        sleep(1);
    }

}