no longer needed, and make the error message more similar to
what the internal spell checker returns under the same
circumstances. (DLR)
+ - Set the SIGWINCH handler back to the default just before
+ running the alternate spell checker, so that the alternate
+ spell checker can handle them, and set it back afterwards.
+ (DLR)
do_spell()
- When displaying an error message from do_(int|alt)_speller(),
don't display the error message corresponding to errno if
size_t totsize_save = openfile->totsize;
/* Our saved value of totsize, used when we spell-check a marked
* selection. */
+ struct sigaction newaction, oldaction;
+ /* Original and temporary handlers for SIGWINCH. */
if (old_mark_set) {
/* If the mark is on, save the number of the line it starts on,
}
spellargs[arglen - 2] = tempfile_name;
+ /* Save the original SIGWINCH handler, and set the SIGWINCH handler
+ * back to the default, so that the alternate spell checker can
+ * handle a SIGWINCH its own way. */
+ sigaction(SIGWINCH, NULL, &newaction);
+ newaction.sa_handler = SIG_DFL;
+ sigaction(SIGWINCH, &newaction, &oldaction);
+
/* Start a new process for the alternate speller. */
if ((pid_spell = fork()) == 0) {
/* Start alternate spell program; we are using PATH. */
/* Wait for alternate speller to complete. */
wait(&alt_spell_status);
+ /* Set the SIGWINCH handler back to the original. */
+ sigaction(SIGWINCH, &oldaction, NULL);
+
refresh();
/* Restore the terminal to its previous state. */