diff options
Diffstat (limited to 'src/mod_cgi.c')
-rw-r--r-- | src/mod_cgi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mod_cgi.c b/src/mod_cgi.c index 25d2f65..083be91 100644 --- a/src/mod_cgi.c +++ b/src/mod_cgi.c @@ -1288,6 +1288,15 @@ TRIGGER_FUNC(cgi_trigger) { #endif break; case -1: + if (errno == ECHILD) { + /* someone else called waitpid... remove the pid to stop looping the error each time */ + log_error_write(srv, __FILE__, __LINE__, "s", "cgi child vanished, probably someone else called waitpid"); + + cgi_pid_del(srv, p, p->cgi_pid.ptr[ndx]); + ndx--; + continue; + } + log_error_write(srv, __FILE__, __LINE__, "ss", "waitpid failed: ", strerror(errno)); return HANDLER_ERROR; |