From 2d5c917b1aa61bb958d7cb56c9312478763a4a1c Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 10 May 2018 12:21:53 +0200 Subject: [PATCH] signals: exclude the crash handler from the tiny version The tiny version contains much less code, so is less likely to crash. And the users most likely use it for very simple and short editing jobs, making the chance of a crash still smaller. So the handler would just be bloat. --- src/nano.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nano.c b/src/nano.c index 970d5cf3..33466621 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1215,7 +1215,7 @@ void signal_init(void) #endif } -#ifndef DEBUG +#if !defined(NANO_TINY) && !defined(DEBUG) if (getenv("NANO_NOCATCH") == NULL) { /* Trap SIGSEGV and SIGABRT to save any changed buffers and reset * the terminal to a usable state. Reset these handlers to their @@ -1234,7 +1234,7 @@ RETSIGTYPE handle_hupterm(int signal) die(_("Received SIGHUP or SIGTERM\n")); } -#ifndef DEBUG +#if !defined(NANO_TINY) && !defined(DEBUG) /* Handler for SIGSEGV (segfault) and SIGABRT (abort). */ RETSIGTYPE handle_crash(int signal) {