2 * SEGV / backtrace handling test.
4 * copied from test-sig.c
6 * Copyright (C) 2013 by David Lamparter, Open Source Routing.
7 * Copyright (C) 2013 by Internet Systems Consortium, Inc. ("ISC")
9 * This file is part of Quagga
11 * Quagga is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2, or (at your option) any
16 * Quagga is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with Quagga; see the file COPYING. If not, write to the Free
23 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
30 #include "lib/memory.h"
32 struct quagga_signal_t sigs[] =
36 struct thread_master *master;
39 threadfunc (struct thread *thread)
49 master = thread_master_create ();
50 signal_init (master, array_size(sigs), sigs);
52 zlog_default = openzlog("testsegv", ZLOG_NONE,
53 LOG_CONS|LOG_NDELAY|LOG_PID, LOG_DAEMON);
54 zlog_set_level (NULL, ZLOG_DEST_SYSLOG, ZLOG_DISABLED);
55 zlog_set_level (NULL, ZLOG_DEST_STDOUT, LOG_DEBUG);
56 zlog_set_level (NULL, ZLOG_DEST_MONITOR, ZLOG_DISABLED);
58 thread_execute (master, threadfunc, 0, 0);