In my tutorial, I found an example how should signal handler be written, but it seems I failed to understand it. In this example everything works as it is supposed to, but how should I write second signal handler (sig_alrm) using sigsetjmp and siglongjmp functions to prevent first signal handler (sig_usr1) to be terminated by SIGALRM signal and never be finished ...