don't report the "cgi died ?" in case we killed the dangling CGI process

with SIGTERM


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2065 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.19
Jan Kneschke 15 years ago
parent 9d6da0d16c
commit 830bb59d86
  1. 8
      src/mod_cgi.c

@ -1227,8 +1227,14 @@ TRIGGER_FUNC(cgi_trigger) {
#if 0
log_error_write(srv, __FILE__, __LINE__, "sd", "(debug) cgi exited fine, pid:", p->cgi_pid.ptr[ndx]);
#endif
} else if (WIFSIGNALED(status)) {
/* FIXME: what if we killed the CGI script with a kill(..., SIGTERM) ?
*/
if (WTERMSIG(status) != SIGTERM) {
log_error_write(srv, __FILE__, __LINE__, "sd", "cleaning up CGI: process died with signal", WTERMSIG(status));
}
} else {
log_error_write(srv, __FILE__, __LINE__, "s", "cgi died ?");
log_error_write(srv, __FILE__, __LINE__, "s", "cleaning up CGI: ended unexpectedly");
}
cgi_pid_del(srv, p, p->cgi_pid.ptr[ndx]);

Loading…
Cancel
Save