--- festival/src/arch/festival/server.cc.orig 2006-03-06 22:44:40.000000000 +0100 +++ festival/src/arch/festival/server.cc 2006-03-06 22:53:08.000000000 +0100 @@ -186,8 +186,16 @@ int festival_start_server(int port) num_clients--; } - while (waitpid(0,&statusp,WNOHANG) != 0) + while ((pid = waitpid(0,&statusp,WNOHANG)) != 0) { + if (pid < 0) { + if (errno == EINTR) // system call has been interrupted, retry + continue; + if (errno == ECHILD) // no child exists, exit + break; + } num_clients--; + } + #endif close(fd1);