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-d3aeb78583b8master
parent
5ad92ac4f8
commit
848f5be64f
10
nano.c
10
nano.c
|
@ -1859,14 +1859,14 @@ int do_int_speller(char *tempfile_name)
|
||||||
|
|
||||||
/* Process end of spell process */
|
/* Process end of spell process */
|
||||||
|
|
||||||
wait(&spell_status);
|
waitpid(pid_spell, &spell_status, WNOHANG);
|
||||||
wait(&sort_status);
|
waitpid(pid_sort, &sort_status, WNOHANG);
|
||||||
wait(&uniq_status);
|
waitpid(pid_uniq, &uniq_status, WNOHANG);
|
||||||
|
|
||||||
if (WIFEXITED(spell_status) && WIFEXITED(sort_status)
|
if (WIFEXITED(spell_status) && WIFEXITED(sort_status)
|
||||||
&& WIFEXITED(uniq_status)) {
|
&& WIFEXITED(uniq_status)) {
|
||||||
if (WEXITSTATUS(spell_status) != 0 || WEXITSTATUS(sort_status)
|
if (WEXITSTATUS(spell_status) != 0 || WEXITSTATUS(sort_status) != 0
|
||||||
|| WEXITSTATUS(uniq_status))
|
|| WEXITSTATUS(uniq_status) != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else
|
} else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue