From: Jeff Trawick Date: Tue, 12 Nov 2002 12:23:42 +0000 (+0000) Subject: watch out for the should-not-occur condition where the daemon can't X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfbc3300ee55475ed720a6ed0482a677479ad907;p=thirdparty%2Fapache%2Fhttpd.git watch out for the should-not-occur condition where the daemon can't find the script pid in the hash and returns zero... if we send sigterm to pid zero, we knock out ourself change the cleanup to return any error from cleanup_nonchild_process() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97493 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 4e188b6c3cd..69f8420772b 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -1126,9 +1126,13 @@ static apr_status_t cleanup_script(void *vptr) } close(sd); - cleanup_nonchild_process(info->r, pid); - - return APR_SUCCESS; + if (pid == 0) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, info->r, + "daemon couldn't find CGI process for connection %lu", + info->conn_id); + return APR_EGENERAL; + } + return cleanup_nonchild_process(info->r, pid); } static int cgid_handler(request_rec *r)