nano

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

commit 0f7a309adcf25470e53a41c32cc53c7835ae344d
parent c771167b6acb121196d42a9f020ccb774bee4409
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon,  7 Sep 2020 11:17:47 +0200

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.

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

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