nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 2d5c917b1aa61bb958d7cb56c9312478763a4a1c
parent 95002da66c258477e09dde7297bed533c9f1b16c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 10 May 2018 12:21:53 +0200

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.

Diffstat:
Msrc/nano.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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) {