randy 97/08/31 15:59:09
Modified: src/modules/standard mod_cgi.c Log: Convert log_*() to aplog_error(). Revision Changes Path 1.55 +12 -11 apachen/src/modules/standard/mod_cgi.c Index: mod_cgi.c =================================================================== RCS file: /export/home/cvs/apachen/src/modules/standard/mod_cgi.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- mod_cgi.c 1997/08/18 13:12:11 1.54 +++ mod_cgi.c 1997/08/31 22:59:08 1.55 @@ -155,12 +155,12 @@ { NULL} }; -static int log_scripterror(request_rec *r, cgi_server_conf *conf, int ret, - char *error) +static int log_scripterror (request_rec *r, cgi_server_conf *conf, int ret, + char *error) { FILE *f; - log_reason(error, r->filename, r); + aplog_error(APLOG_MARK, APLOG_ERR, r->server, error, r->filename); if (!conf->logname || ((stat(server_root_relative(r->pool, conf->logname), &r->finfo) == 0) @@ -182,8 +182,8 @@ return ret; } -static int log_script(request_rec *r, cgi_server_conf *conf, int ret, - char *dbuf, char *sbuf, BUFF *script_in, BUFF *script_err) +static int log_script (request_rec *r, cgi_server_conf *conf, int ret, + char *dbuf, char *sbuf, BUFF *script_in, BUFF *script_err) { table *hdrs_arr = r->headers_in; table_entry *hdrs = (table_entry *)hdrs_arr->elts; @@ -323,7 +323,7 @@ * * Oh, well. Muddle through as best we can... * - * (NB we can't use log_error, or anything like that, because we + * (NB we can't use aplog_error, or anything like that, because we * just closed the file descriptor which r->server->error_log * was tied to in cleanup_for_exec(). It's only available on stderr * now, so that's what we use). @@ -412,11 +412,12 @@ * SSI request -djg */ if (!(child_pid = - spawn_child_err_buff (r->main ? r->main->pool : r->pool, cgi_child, - (void *)&cld, - kill_after_timeout, - &script_out, &script_in, &script_err))) { - log_reason ("couldn't spawn child process", r->filename, r); + spawn_child_err_buff(r->main ? r->main->pool : r->pool, cgi_child, + (void *)&cld, + kill_after_timeout, + &script_out, &script_in, &script_err))) { + aplog_error(APLOG_MARK, APLOG_ERR, r->server, + "couldn't spawn child process: %s", r->filename); return SERVER_ERROR; }