diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/panic.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/panic.c b/src/panic.c index a08f89fa..072f458b 100644 --- a/src/panic.c +++ b/src/panic.c @@ -27,6 +27,7 @@ * @{ * \file panic.c */ +#include <unistd.h> #include <osmocom/core/panic.h> #include <osmocom/core/backtrace.h> @@ -83,8 +84,14 @@ void osmo_panic(const char *fmt, ...) osmo_panic_default(fmt, args); va_end(args); + + /* not reached, but make compiler believe we really never return */ +#ifndef PANIC_INFLOOP + exit(2342); +#else + while (1) ; +#endif } - /*! Set the panic handler * \param[in] h New panic handler function |