1#include <signal.h>
2#include <stdio.h>
3#include <unistd.h>
4
5void handler_usr1 (int i)
6{
7 puts (s: "got signal usr1");
8}
9
10void handler_alrm (int i)
11{
12 puts (s: "got signal ALRM");
13}
14
15int main ()
16{
17 int i = 0;
18
19 signal (SIGUSR1, handler: handler_usr1);
20 signal (SIGALRM, handler: handler_alrm);
21
22 puts (s: "Put breakpoint here");
23
24 while (i++ < 20)
25 sleep (seconds: 1);
26}
27
28

source code of lldb/test/API/functionalities/signal/main.c