tweaks: put the unblocking of SIGWINCHes in a better place

The blocking is needed only during the wait(), so unblock SIGWINCH
again right after the wait() -- also to have the unblocking before
a possible error exit.
master
Benno Schulenberg 2019-03-27 19:06:23 +01:00
parent 978c121de1
commit f58869d072
1 changed files with 5 additions and 8 deletions

View File

@ -2653,12 +2653,14 @@ const char *do_alt_speller(char *tempfile_name)
return _("Could not fork"); return _("Could not fork");
#ifndef NANO_TINY #ifndef NANO_TINY
/* Block SIGWINCHes so the spell checker doesn't get any. */ /* Block SIGWINCHes while waiting for the alternate spell checker's end,
* so nano doesn't get pushed past the wait(). */
allow_sigwinch(FALSE); allow_sigwinch(FALSE);
#endif #endif
/* Wait for the alternate spell checker to finish. */
wait(&alt_spell_status); wait(&alt_spell_status);
#ifndef NANO_TINY
allow_sigwinch(TRUE);
#endif
/* Reenter curses mode. */ /* Reenter curses mode. */
doupdate(); doupdate();
@ -2711,11 +2713,6 @@ const char *do_alt_speller(char *tempfile_name)
adjust_viewport(STATIONARY); adjust_viewport(STATIONARY);
} }
#ifndef NANO_TINY
/* Unblock SIGWINCHes again. */
allow_sigwinch(TRUE);
#endif
return NULL; return NULL;
} }