1 Enable core dump on SIGSEGV. How to use:
4 # sysctl -w kernel.core_pattern=/tmp/%e.core
5 # touch /.init_enable_core
7 and wait for core dump of olsrd in /tmp/olsrd.core (920 KB) or use kill -11 on olsrd pid to test.
9 Index: on_firmware/routing/olsrd/patches/024-debug-sigsegv.patch
10 ===================================================================
12 +++ on_firmware/routing/olsrd/patches/024-debug-sigsegv.patch
17 + signal(SIGQUIT, olsr_shutdown);
18 + signal(SIGILL, olsr_shutdown);
19 + signal(SIGABRT, olsr_shutdown);
20 +-#if defined(__linux__) && !defined(__ANDROID__)
21 ++#ifdef OLSR_HAVE_EXECINFO_H
22 + signal(SIGSEGV, olsr_segv_handler);
23 + #endif /* defined(__linux__) && !defined(__ANDROID__) */
24 + signal(SIGTERM, olsr_shutdown);