Commit 848f5be6 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Change waits to waitpids to lessen the chance of a hang, and fix status check

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1324 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 5ad92ac4
Showing with 5 additions and 5 deletions
+5 -5
......@@ -1859,14 +1859,14 @@ int do_int_speller(char *tempfile_name)
/* Process end of spell process */
wait(&spell_status);
wait(&sort_status);
wait(&uniq_status);
waitpid(pid_spell, &spell_status, WNOHANG);
waitpid(pid_sort, &sort_status, WNOHANG);
waitpid(pid_uniq, &uniq_status, WNOHANG);
if (WIFEXITED(spell_status) && WIFEXITED(sort_status)
&& WIFEXITED(uniq_status)) {
if (WEXITSTATUS(spell_status) != 0 || WEXITSTATUS(sort_status)
|| WEXITSTATUS(uniq_status))
if (WEXITSTATUS(spell_status) != 0 || WEXITSTATUS(sort_status) != 0
|| WEXITSTATUS(uniq_status) != 0)
return FALSE;
} else
return FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment