mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-21 15:54:19 +03:00
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.
This commit is contained in:
parent
c771167b6a
commit
0f7a309adc
10
src/nano.c
10
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user