From 0f7a309adcf25470e53a41c32cc53c7835ae344d Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 7 Sep 2020 11:17:47 +0200 Subject: [PATCH] suspension: properly resume from an external SIGSTOP Trying to ignore an external SIGSTOP/SIGTSTP with SIG_IGN does not work, so always install the SIGCONT handler so that it is possible to continue from a SIGSTOP. This fixes https://savannah.gnu.org/bugs/?59073. Bug existed since before version 2.0.6. --- src/nano.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/nano.c b/src/nano.c index c8901801..22b90717 100644 --- a/src/nano.c +++ b/src/nano.c @@ -882,7 +882,6 @@ void signal_init(void) sigaction(SIGWINCH, &deed, NULL); #endif - if (ISSET(SUSPENDABLE)) { /* Block all other signals in the suspend and continue handlers. * If we don't do this, other stuff interrupts them! */ sigfillset(&deed.sa_mask); @@ -895,12 +894,6 @@ void signal_init(void) deed.sa_handler = do_continue; sigaction(SIGCONT, &deed, NULL); #endif - } else { -#ifdef SIGTSTP - deed.sa_handler = SIG_IGN; - sigaction(SIGTSTP, &deed, NULL); -#endif - } #if !defined(NANO_TINY) && !defined(DEBUG) if (getenv("NANO_NOCATCH") == NULL) { @@ -1086,9 +1079,6 @@ void do_toggle(int flag) mouse_init(); break; #endif - case SUSPENDABLE: - signal_init(); - break; case SOFTWRAP: if (ISSET(SOFTWRAP)) compute_the_extra_rows_per_line_from(openfile->filetop);