diff -urNad apache-2.2.9~/server/mpm/experimental/itk/itk.c apache-2.2.9/server/mpm/experimental/itk/itk.c --- apache-2.2.9~/server/mpm/experimental/itk/itk.c 2008-11-29 22:00:04.000000000 +0000 +++ apache-2.2.9/server/mpm/experimental/itk/itk.c 2008-11-29 22:02:23.000000000 +0000 @@ -692,6 +692,7 @@ { pid_t pid = fork(); + pid_t w; int status; switch (pid) { case -1: @@ -706,17 +707,21 @@ } exit(0); default: /* parent; just wait for child to be done */ - if (waitpid(pid, &status, 0) != pid || !WIFEXITED(status)) { - if (WIFSIGNALED(status)) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "child died with signal %u", WTERMSIG(status)); - } else if (WEXITSTATUS(status) != 0) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "child exited with non-zero exit status %u", WEXITSTATUS(status)); - } else { - ap_log_error(APLOG_MARK, APLOG_ERR, errno, NULL, "waitpid() failed"); - } - clean_child_exit(1); - } - break; + do { + w = waitpid(pid, &status, 0); + if( w != pid ) + { + if (w == -1 && errno != EINTR ) { + ap_log_error(APLOG_MARK, APLOG_ERR, errno, NULL, "waitpid() failed"); + clean_child_exit(1); + } + + if (WEXITSTATUS(status) != 0) + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "child exited with non-zero exit status %u", WEXITSTATUS(status)); + else if (WIFSIGNALED(status) != 1) + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "child died with signal %u", WTERMSIG(status)); + } + } while ( w != pid ); } }