You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
346 B

#include <signal.h>
#include <stdio.h>
#include <unistd.h>
void handler_usr1 (int i)
{
puts ("got signal usr1");
}
void handler_alrm (int i)
{
puts ("got signal ALRM");
}
int main ()
{
int i = 0;
signal (SIGUSR1, handler_usr1);
signal (SIGALRM, handler_alrm);
puts ("Put breakpoint here");
while (i++ < 20)
sleep (1);
}