]>
git.proxmox.com Git - mirror_frr.git/blob - tests/lib/test_sig.c
2 * This file is part of Quagga.
4 * Quagga is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2, or (at your option) any
9 * Quagga is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; see the file COPYING; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #include "lib/memory.h"
27 printf ("processed hup\n");
33 printf ("processed usr1\n");
39 printf ("processed usr2\n");
42 struct quagga_signal_t sigs
[] =
58 struct thread_master
*master
;
64 master
= thread_master_create(NULL
);
65 signal_init (master
, array_size(sigs
), sigs
);
67 openzlog("testsig", "NONE", 0, LOG_CONS
| LOG_NDELAY
| LOG_PID
, LOG_DAEMON
);
68 zlog_set_level(ZLOG_DEST_SYSLOG
, ZLOG_DISABLED
);
69 zlog_set_level(ZLOG_DEST_STDOUT
, LOG_DEBUG
);
70 zlog_set_level(ZLOG_DEST_MONITOR
, ZLOG_DISABLED
);
72 while (thread_fetch (master
, &t
))