blob: 69c0b721c4e49138a93a96785a39a57920818e30 [file] [log] [blame]
paul9a76e2d2004-01-19 21:25:17 +00001
2#include <zebra.h>
3#include <sigevent.h>
4
5void
6sighup (void)
7{
8 printf ("processed hup\n");
9}
10
11void
12sigusr1 (void)
13{
14 printf ("processed usr1\n");
15}
16
17void
18sigusr2 (void)
19{
20 printf ("processed usr2\n");
21}
22
23struct quagga_signal_t sigs[] =
24{
25 {
26 .signal = SIGHUP,
27 .handler = &sighup,
28 },
29 {
30 .signal = SIGUSR1,
31 .handler = &sigusr1,
32 },
33 {
34 .signal = SIGUSR2,
35 .handler = &sigusr2,
36 }
37};
38
39struct thread_master *master;
40struct thread t;
41
42int
43main (void)
44{
45 master = thread_master_create ();
46 signal_init (master, Q_SIGC(sigs), sigs);
47
48 while (thread_fetch (master, &t))
49 thread_call (&t);
50
51 exit (0);
52}