I am registering an alarm signal handler as follows and an alarm signal is set every second.
sigact.sa_handler = time_handler;
sigemptyset(&sigact.sa_mask);
sigact.sa_flags = SA_RESTART;
if (sigaction(SIGALRM, &sigact, NULL) < 0)
panic("sigaction SIGALRM: %s\n", strerror(errno));
/* Set alarm signal every second */
alarm(1);
My question is does the function time_handler
follow a separate execution path like a thread or does it block the main process.