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.
master
Benno Schulenberg 2020-09-07 11:17:47 +02:00
parent c771167b6a
commit 0f7a309adc
1 changed files with 0 additions and 10 deletions

View File

@ -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);