Fixed a bug which prevented final waiting and caused lots of zombies

This commit is contained in:
Thomas Schmitt 2009-03-27 21:25:44 +01:00
parent e759bd5240
commit 8b0920df53

View File

@ -286,7 +286,7 @@ int extf_stream_close(IsoStream *stream)
close(data->running->send_fd); close(data->running->send_fd);
ret = waitpid(data->running->pid, &status, WNOHANG); ret = waitpid(data->running->pid, &status, WNOHANG);
if (ret == -1 && data->running->pid != 0) { if (ret == 0 && data->running->pid != 0) {
kill(data->running->pid, SIGKILL); kill(data->running->pid, SIGKILL);
waitpid(data->running->pid, &status, 0); waitpid(data->running->pid, &status, 0);
} }