// Clause: 7.14 — The behavior is undefined if the signal handler calls any function other than a very limited set.
// Calling printf in a signal handler is UB.
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>

void hdl(int signum){
    (void)signum;
    printf("in handler\n"); // UB: not async-signal-safe per C
    exit(0);
}

int main(void){
    signal(SIGINT, hdl);
    raise(SIGINT);
    return 0;
}
