From c871b41d3c6f36636076de9bc7661840a5ba1625 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 17 May 2002 11:11:39 +0000 Subject: [PATCH] stop using APLOG_NOERRNO in calls to ap_log_?error() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68 --- server/config.c | 28 +++---- server/core.c | 14 ++-- server/log.c | 10 +-- server/main.c | 72 ++++++++--------- server/mpm/beos/beos.c | 40 +++++----- server/mpm/experimental/leader/leader.c | 80 +++++++++---------- server/mpm/experimental/perchild/perchild.c | 70 ++++++++-------- .../mpm/experimental/threadpool/threadpool.c | 80 +++++++++---------- server/mpm/mpmt_os2/mpmt_os2.c | 20 ++--- server/mpm/mpmt_os2/mpmt_os2_child.c | 4 +- server/mpm/netware/mpm_netware.c | 32 ++++---- server/mpm/prefork/prefork.c | 50 ++++++------ server/mpm/winnt/mpm_winnt.c | 44 +++++----- server/mpm/winnt/registry.c | 4 +- server/mpm/winnt/service.c | 2 +- server/mpm/worker/worker.c | 78 +++++++++--------- server/mpm_common.c | 16 ++-- server/protocol.c | 16 ++-- server/request.c | 14 ++-- server/scoreboard.c | 4 +- server/util.c | 16 ++-- server/util_filter.c | 6 +- server/util_script.c | 6 +- server/util_xml.c | 6 +- server/vhost.c | 12 +-- 25 files changed, 362 insertions(+), 362 deletions(-) diff --git a/server/config.c b/server/config.c index 0c89758dc6..75cb3849f3 100644 --- a/server/config.c +++ b/server/config.c @@ -375,7 +375,7 @@ AP_CORE_DECLARE(int) ap_invoke_handler(request_rec *r) r->handler = old_handler; if (result == DECLINED && r->handler && r->filename) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "handler \"%s\" not found for: %s", r->handler, r->filename); } @@ -422,10 +422,10 @@ AP_DECLARE(void) ap_add_module(module *m, apr_pool_t *p) */ if (m->version != MODULE_MAGIC_NUMBER_MAJOR) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "%s: module \"%s\" is not compatible with this " "version of Apache.", ap_server_argv0, m->name); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please contact the vendor for the correct version."); exit(1); } @@ -440,10 +440,10 @@ AP_DECLARE(void) ap_add_module(module *m, apr_pool_t *p) dynamic_modules++; if (dynamic_modules > DYNAMIC_MODULE_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "%s: module \"%s\" could not be loaded, because" " the dynamic", ap_server_argv0, m->name); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "module limit was reached. Please increase " "DYNAMIC_MODULE_LIMIT and recompile."); exit(1); @@ -509,7 +509,7 @@ AP_DECLARE(void) ap_remove_module(module *m) if (!modp) { /* Uh-oh, this module doesn't exist */ - ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Cannot remove module %s: not found in module list", m->name); return; @@ -599,7 +599,7 @@ AP_DECLARE(void) ap_setup_prelinked_modules(process_rec *process) sizeof(module *) * (total_modules + DYNAMIC_MODULE_LIMIT + 1)); if (ap_loaded_modules == NULL) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Ouch! Out of memory in ap_setup_prelinked_modules()!"); } @@ -1378,7 +1378,7 @@ static void process_command_config(server_rec *s, apr_array_header_t *arr, errmsg = ap_build_config(&parms, p, ptemp, conftree); if (errmsg) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Syntax error in -C/-c directive:" APR_EOL_STR "%s", errmsg); exit(1); @@ -1484,7 +1484,7 @@ AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname, parms.override = (RSRC_CONF | OR_ALL) & ~(OR_AUTHCFG | OR_LIMIT); if (ap_pcfg_openfile(&cfp, p, fname) != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "%s: could not open document config file %s", ap_server_argv0, fname); exit(1); @@ -1495,11 +1495,11 @@ AP_DECLARE(void) ap_process_resource_config(server_rec *s, const char *fname, errmsg = ap_build_config(&parms, p, ptemp, conftree); if (errmsg != NULL) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Syntax error on line %d of %s:", parms.err_directive->line_num, parms.err_directive->filename); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "%s", errmsg); exit(1); } @@ -1523,11 +1523,11 @@ AP_DECLARE(void) ap_process_config_tree(server_rec *s, errmsg = ap_walk_config(conftree, &parms, s->lookup_defaults); if (errmsg) { - ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, p, + ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p, "Syntax error on line %d of %s:", parms.err_directive->line_num, parms.err_directive->filename); - ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, p, + ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, p, "%s", errmsg); exit(1); } @@ -1584,7 +1584,7 @@ AP_CORE_DECLARE(int) ap_parse_htaccess(ap_conf_vector_t **result, ap_cfg_closefile(f); if (errmsg) { - ap_log_rerror(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ALERT, 0, r, "%s: %s", filename, errmsg); return HTTP_INTERNAL_SERVER_ERROR; } diff --git a/server/core.c b/server/core.c index 776420b706..82cd3e28b3 100644 --- a/server/core.c +++ b/server/core.c @@ -1083,7 +1083,7 @@ static const char *set_document_root(cmd_parms *cmd, void *dummy, APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS || !ap_is_directory(cmd->pool, arg)) { if (cmd->server->is_virtual) { - ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, + ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool, "Warning: DocumentRoot [%s] does not exist", arg); @@ -1155,7 +1155,7 @@ static const char *set_error_document(cmd_parms *cmd, void *conf_, /* The entry should be ignored if it is a full URL for a 401 error */ if (error_number == 401 && what == REMOTE_PATH) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, cmd->server, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server, "cannot use a full URL in a 401 ErrorDocument " "directive --- ignoring!"); } @@ -2505,7 +2505,7 @@ AP_DECLARE(size_t) ap_get_limit_xml_body(const request_rec *r) static const char *no_set_limit(cmd_parms *cmd, void *conf_, const char *arg, const char *arg2) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, cmd->server, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, cmd->server, "%s not supported on this platform", cmd->cmd->name); return NULL; @@ -3056,7 +3056,7 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r) return HTTP_FORBIDDEN; } if (!r->uri || ((r->uri[0] != '/') && strcmp(r->uri, "*"))) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Invalid URI in request %s", r->the_request); return HTTP_BAD_REQUEST; } @@ -3200,7 +3200,7 @@ static int default_handler(request_rec *r) if (r->method_number == M_GET || r->method_number == M_POST) { if (r->finfo.filetype == 0) { - ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "File does not exist: %s", r->filename); return HTTP_NOT_FOUND; } @@ -3209,7 +3209,7 @@ static int default_handler(request_rec *r) r->path_info && *r->path_info) { /* default to reject */ - ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "File does not exist: %s", apr_pstrcat(r->pool, r->filename, r->path_info, NULL)); return HTTP_NOT_FOUND; @@ -3274,7 +3274,7 @@ static int default_handler(request_rec *r) } else { /* unusual method (not GET or POST) */ if (r->method_number == M_INVALID) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Invalid method in request %s", r->the_request); return HTTP_NOT_IMPLEMENTED; } diff --git a/server/log.c b/server/log.c index c78411dc68..34aa7a328d 100644 --- a/server/log.c +++ b/server/log.c @@ -604,7 +604,7 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename) * that may screw up scripts written to do something * based on the last modification time of the pid file. */ - ap_log_perror(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, p, + ap_log_perror(APLOG_MARK, APLOG_WARNING, 0, p, apr_psprintf(p, "pid file %s overwritten -- Unclean " "shutdown of previous Apache run?", fname)); @@ -616,7 +616,7 @@ AP_DECLARE(void) ap_log_pid(apr_pool_t *p, const char *filename) != APR_SUCCESS) { ap_log_error(APLOG_MARK, APLOG_ERR, rv, NULL, "could not create %s", fname); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "%s: could not log pid to file %s", ap_server_argv0, fname); exit(1); @@ -632,7 +632,7 @@ AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, char time_str[APR_CTIME_LEN]; apr_ctime(time_str, apr_time_now()); - ap_log_error(APLOG_MARK, APLOG_CRIT | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "[%s] file %s, line %d, assertion \"%s\" failed", time_str, szFile, nLine, szExp); #if defined(WIN32) @@ -663,7 +663,7 @@ static int piped_log_spawn(piped_log *pl) != APR_SUCCESS)) { char buf[120]; /* Something bad happened, give up and go away. */ - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "piped_log_spawn: unable to setup child process '%s': %s", pl->program, apr_strerror(status, buf, sizeof(buf))); rc = -1; @@ -719,7 +719,7 @@ static void piped_log_maintenance(int reason, void *data, apr_wait_t status) /* what can we do? This could be the error log we're having * problems opening up... */ char buf[120]; - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "piped_log_maintenance: unable to respawn '%s': %s", pl->program, apr_strerror(stats, buf, sizeof(buf))); } diff --git a/server/main.c b/server/main.c index f6182f95c1..439a757714 100644 --- a/server/main.c +++ b/server/main.c @@ -291,95 +291,95 @@ static void usage(process_rec *process) pad[i] = '\0'; #ifdef SHARED_CORE - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL , + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL , "Usage: %s [-R directory] [-D name] [-d directory] [-f file]", bin); #else - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Usage: %s [-D name] [-d directory] [-f file]", bin); #endif - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " %s [-C \"directive\"] [-c \"directive\"]", pad); #ifdef WIN32 - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " %s [-k start|restart|stop|shutdown]", pad); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " %s [-k install|config|uninstall] [-n service_name]", pad); #endif - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " %s [-v] [-V] [-h] [-l] [-L] [-t] [-T]", pad); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Options:"); #ifdef SHARED_CORE - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -R directory : specify an alternate location for " "shared object files"); #endif - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -D name : define a name for use in " " directives"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -d directory : specify an alternate initial " "ServerRoot"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -f file : specify an alternate ServerConfigFile"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -C \"directive\" : process directive before reading " "config files"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -c \"directive\" : process directive after reading " "config files"); #ifdef WIN32 - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -n name : set service name and use its " "ServerConfigFile"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -k start : tell Apache to start"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -k restart : tell running Apache to do a graceful " "restart"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -k stop|shutdown : tell running Apache to shutdown"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -k install : install an Apache service"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -k config : change startup Options of an Apache " "service"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -k uninstall : uninstall an Apache service"); #endif - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -e level : show startup errors of level " "(see LogLevel)"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -E file : log startup errors to file"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -v : show version number"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -V : show compile settings"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -h : list available command line options " "(this page)"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -l : list compiled in modules"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -L : list available configuration " "directives"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -t -D DUMP_VHOSTS : show parsed settings (currently only " "vhost settings)"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -t : run syntax check for config files " "(with docroot check)"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " -T : run syntax check for config files " "(without docroot check)"); @@ -551,7 +551,7 @@ int main(int argc, const char * const argv[]) } server_conf = ap_read_config(process, ptemp, confname, &ap_conftree); if (ap_run_pre_config(pconf, plog, ptemp) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, + ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0, NULL, "Pre-configuration failed\n"); destroy_and_exit_process(process, 1); } @@ -561,7 +561,7 @@ int main(int argc, const char * const argv[]) ap_fini_vhost_config(pconf, server_conf); apr_sort_hooks(); if (configtestonly) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Syntax OK\n"); destroy_and_exit_process(process, 0); } @@ -577,7 +577,7 @@ int main(int argc, const char * const argv[]) } if ( ap_run_post_config(pconf, plog, ptemp, server_conf) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, 0, + ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0, NULL, "Configuration Failed\n"); destroy_and_exit_process(process, 1); } @@ -602,7 +602,7 @@ int main(int argc, const char * const argv[]) ap_server_root = def_server_root; server_conf = ap_read_config(process, ptemp, confname, &ap_conftree); if (ap_run_pre_config(pconf, plog, ptemp) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, + ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0, NULL, "Pre-configuration failed\n"); destroy_and_exit_process(process, 1); } @@ -613,13 +613,13 @@ int main(int argc, const char * const argv[]) apr_sort_hooks(); apr_pool_clear(plog); if (ap_run_open_logs(pconf, plog, ptemp, server_conf) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR| APLOG_NOERRNO, + ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0, NULL, "Unable to open logs\n"); destroy_and_exit_process(process, 1); } if (ap_run_post_config(pconf, plog, ptemp, server_conf) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR | APLOG_NOERRNO, + ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0, NULL, "Configuration Failed\n"); destroy_and_exit_process(process, 1); } diff --git a/server/mpm/beos/beos.c b/server/mpm/beos/beos.c index 9e527a90e0..db6173f03f 100644 --- a/server/mpm/beos/beos.c +++ b/server/mpm/beos/beos.c @@ -337,7 +337,7 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, (void)apr_os_sock_get(&csd, sock); if (csd >= FD_SETSIZE) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "filedescriptor (%u) larger than FD_SETSIZE (%u) " "found, you probably need to rebuild Apache with a " "larger FD_SETSIZE", csd, FD_SETSIZE); @@ -503,7 +503,7 @@ static int32 worker_thread(void * dummy) apr_bucket_alloc_destroy(bucket_alloc); - ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, NULL, "worker_thread %ld exiting", find_thread(NULL)); apr_thread_mutex_lock(worker_thread_count_mutex); @@ -565,7 +565,7 @@ static void check_restart(void *data) if (!restart_pending && !shutdown_pending) { int slot = (int)data; make_worker(slot); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "spawning a new worker thread in slot %d", slot); } } @@ -694,7 +694,7 @@ static void server_main_loop(int remaining_threads_to_start) * scoreboard. Somehow we don't know about this * child. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "long lost child came home! (pid %ld)", pid.pid); } @@ -806,7 +806,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) } if ((num_listening_sockets = ap_setup_listeners(ap_server_conf)) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, "no listening sockets available, shutting down"); return 1; } @@ -912,11 +912,11 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) /* * record that we've entered the world ! */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); restart_pending = shutdown_pending = 0; @@ -943,7 +943,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) const char *pidfile = NULL; pidfile = ap_server_root_relative (pconf, ap_pid_fname); if ( pidfile != NULL && unlink(pidfile) == 0) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); } @@ -968,7 +968,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) if (!child_fatal) { /* already recorded */ /* record the shutdown in the log */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); } @@ -979,7 +979,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) signal(SIGHUP, SIG_IGN); if (is_graceful) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, AP_SIG_GRACEFUL_STRING " received. Doing graceful restart"); } else { @@ -989,7 +989,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) */ ap_reclaim_child_processes(1); /* Start with SIGTERM */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "SIGHUP received. Attempting to restart"); } @@ -1067,7 +1067,7 @@ static const char *set_threads_to_start(cmd_parms *cmd, void *dummy, const char ap_threads_to_start = atoi(arg); if (ap_threads_to_start < 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "StartThreads set to a value less than 0, reset to 1"); ap_threads_to_start = 1; } @@ -1083,11 +1083,11 @@ static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, const char min_spare_threads = atoi(arg); if (min_spare_threads <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); min_spare_threads = 1; } @@ -1115,18 +1115,18 @@ static const char *set_threads_limit (cmd_parms *cmd, void *dummy, const char *a ap_thread_limit = atoi(arg); if (ap_thread_limit > HARD_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients of %d exceeds compile time limit " "of %d servers,", ap_thread_limit, HARD_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering MaxClients to %d. To increase, please " "see the", HARD_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " HARD_THREAD_LIMIT define in server/mpm/beos/mpm_default.h."); ap_thread_limit = HARD_THREAD_LIMIT; } else if (ap_thread_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require MaxClients > 0, setting to %d", HARD_THREAD_LIMIT); ap_thread_limit = HARD_THREAD_LIMIT; } @@ -1142,7 +1142,7 @@ static const char *set_max_requests_per_thread (cmd_parms *cmd, void *dummy, con ap_max_requests_per_thread = atoi(arg); if (ap_max_requests_per_thread < 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxRequestsPerThread was set below 0" "reset to 0, but this may not be what you want."); ap_max_requests_per_thread = 0; diff --git a/server/mpm/experimental/leader/leader.c b/server/mpm/experimental/leader/leader.c index f1b8fc654b..8dff2d966b 100644 --- a/server/mpm/experimental/leader/leader.c +++ b/server/mpm/experimental/leader/leader.c @@ -489,7 +489,7 @@ static void sig_coredump(int sig) apr_filepath_set(ap_coredump_dir, pconf); apr_signal(sig, SIG_DFL); if (ap_my_pid == parent_pid) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "seg fault or similar nasty error detected " "in the parent process"); @@ -723,7 +723,7 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num, apr_os_sock_get(&csd, sock); if (csd >= FD_SETSIZE) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "new file descriptor %d is too large; you probably need " "to rebuild Apache with a larger FD_SETSIZE " "(currently %d)", @@ -997,7 +997,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy) idle_worker_stack = worker_stack_create(pchild, ap_threads_per_child); if (idle_worker_stack == NULL) { - ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, ap_server_conf, "worker_stack_create() failed"); clean_child_exit(APEXIT_CHILDFATAL); } @@ -1302,7 +1302,7 @@ static int make_child(server_rec *s, int slot) int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "processor unbind failed %d", status); #endif @@ -1447,7 +1447,7 @@ static void perform_idle_server_maintenance(void) static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); @@ -1460,7 +1460,7 @@ static void perform_idle_server_maintenance(void) free_length = idle_spawn_rate; } if (idle_spawn_rate >= 8) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "server seems busy, (you may need " "to increase StartServers, ThreadsPerChild " @@ -1537,7 +1537,7 @@ static void server_main_loop(int remaining_children_to_start) /* Great, we've probably just lost a slot in the * scoreboard. Somehow we don't know about this child. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "long lost child came home! (pid %ld)", (long)pid.pid); @@ -1577,7 +1577,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) first_server_limit = server_limit; first_thread_limit = thread_limit; if (changed_limit_at_restart) { - ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, 0, s, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "WARNING: Attempt to change ServerLimit or ThreadLimit " "ignored during restart"); changed_limit_at_restart = 0; @@ -1648,13 +1648,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) hold_off_on_exponential_spawning = 10; } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif restart_pending = shutdown_pending = 0; @@ -1675,12 +1675,12 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) const char *pidfile = NULL; pidfile = ap_server_root_relative (pconf, ap_pid_fname); if ( pidfile != NULL && unlink(pidfile) == 0) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); } return 1; @@ -1702,7 +1702,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_scoreboard_image->global->running_generation = ap_my_generation; if (is_graceful) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, AP_SIG_GRACEFUL_STRING " received. Doing graceful restart"); /* wake up the children...time to die. But we'll have more soon */ ap_mpm_pod_killpg(pod, ap_daemons_limit, TRUE); @@ -1721,7 +1721,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_mpm_pod_killpg(pod, ap_daemons_limit, FALSE); ap_reclaim_child_processes(1); /* Start with SIGTERM */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "SIGHUP received. Attempting to restart"); } @@ -1739,7 +1739,7 @@ static int leader_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, ap_server_conf = s; if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT|APLOG_STARTUP, 0, + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, NULL, "no listening sockets available, shutting down"); return DONE; } @@ -1879,11 +1879,11 @@ static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, min_spare_threads = atoi(arg); if (min_spare_threads <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); min_spare_threads = 1; } @@ -1916,47 +1916,47 @@ static const char *set_max_clients (cmd_parms *cmd, void *dummy, * sure that it gets set before MaxClients in the pre_config stage. */ max_clients = atoi(arg); if (max_clients < ap_threads_per_child) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients (%d) must be at least as large", max_clients); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " large as ThreadsPerChild (%d). Automatically", ap_threads_per_child); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " increasing MaxClients to %d.", ap_threads_per_child); max_clients = ap_threads_per_child; } ap_daemons_limit = max_clients / ap_threads_per_child; if ((max_clients > 0) && (max_clients % ap_threads_per_child)) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients (%d) is not an integer multiple", max_clients); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " of ThreadsPerChild (%d), lowering MaxClients to %d", ap_threads_per_child, ap_daemons_limit * ap_threads_per_child); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " for a maximum of %d child processes,", ap_daemons_limit); max_clients = ap_daemons_limit * ap_threads_per_child; } if (ap_daemons_limit > server_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients of %d would require %d servers,", max_clients, ap_daemons_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " and would exceed the ServerLimit value of %d.", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " Automatically lowering MaxClients to %d. To increase,", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " please see the ServerLimit directive."); ap_daemons_limit = server_limit; } else if (ap_daemons_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require MaxClients > 0, setting to 1"); ap_daemons_limit = 1; } @@ -1973,19 +1973,19 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, ap_threads_per_child = atoi(arg); if (ap_threads_per_child > thread_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadsPerChild of %d exceeds ThreadLimit " "value of %d", ap_threads_per_child, thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "threads, lowering ThreadsPerChild to %d. To increase, please" " see the", thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " ThreadLimit directive."); ap_threads_per_child = thread_limit; } else if (ap_threads_per_child < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadsPerChild > 0, setting to 1"); ap_threads_per_child = 1; } @@ -2017,15 +2017,15 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *ar server_limit = tmp_server_limit; if (server_limit > MAX_SERVER_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ServerLimit of %d exceeds compile time limit " "of %d servers,", server_limit, MAX_SERVER_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ServerLimit to %d.", MAX_SERVER_LIMIT); server_limit = MAX_SERVER_LIMIT; } else if (server_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ServerLimit > 0, setting to 1"); server_limit = 1; } @@ -2057,15 +2057,15 @@ static const char *set_thread_limit (cmd_parms *cmd, void *dummy, const char *ar thread_limit = tmp_thread_limit; if (thread_limit > MAX_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadLimit of %d exceeds compile time limit " "of %d servers,", thread_limit, MAX_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ThreadLimit to %d.", MAX_THREAD_LIMIT); thread_limit = MAX_THREAD_LIMIT; } else if (thread_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadLimit > 0, setting to 1"); thread_limit = 1; } diff --git a/server/mpm/experimental/perchild/perchild.c b/server/mpm/experimental/perchild/perchild.c index 0ac146dfcd..08ec9385c6 100644 --- a/server/mpm/experimental/perchild/perchild.c +++ b/server/mpm/experimental/perchild/perchild.c @@ -550,7 +550,7 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, long conn_id, } if (csd >= FD_SETSIZE) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "new file descriptor %d is too large; you probably need " "to rebuild Apache with a larger FD_SETSIZE " "(currently %d)", @@ -603,7 +603,7 @@ static int start_thread(void) static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxThreadsPerChild setting, " "consider raising the MaxThreadsPerChild or " @@ -1042,7 +1042,7 @@ static int make_child(server_rec *s, int slot) int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "processor unbind failed %d", status); } #endif @@ -1190,7 +1190,7 @@ static void server_main_loop(int remaining_children_to_start) * child table. Somehow we don't know about this * child. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "long lost child came home! (pid %ld)", (long)pid.pid); @@ -1235,7 +1235,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) first_server_limit = server_limit; first_thread_limit = thread_limit; if (changed_limit_at_restart) { - ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, 0, s, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "WARNING: Attempt to change ServerLimit or ThreadLimit " "ignored during restart"); changed_limit_at_restart = 0; @@ -1319,13 +1319,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) hold_off_on_exponential_spawning = 10; } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif restart_pending = shutdown_pending = 0; @@ -1347,13 +1347,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) const char *pidfile = NULL; pidfile = ap_server_root_relative (pconf, ap_pid_fname); if (pidfile != NULL && unlink(pidfile) == 0) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); } return 1; @@ -1370,7 +1370,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) if (is_graceful) { char char_of_death = '!'; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, AP_SIG_GRACEFUL_STRING " received. " "Doing graceful restart"); @@ -1404,7 +1404,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) "killpg SIGTERM"); } ap_reclaim_child_processes(1); /* Start with SIGTERM */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "SIGHUP received. Attempting to restart"); } return 0; @@ -1421,7 +1421,7 @@ static int perchild_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp ap_server_conf = s; if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT|APLOG_STARTUP, 0, + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, NULL, "no listening sockets available, shutting down"); return DONE; } @@ -1671,7 +1671,7 @@ static int perchild_post_read(request_rec *r) * needs to be passed to another child. */ if (sconf->sd != child_info_table[child_num].sd) { if (pass_request(r) == -1) { - ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "Could not pass request to proper " "child, request will not be honored."); } @@ -1714,18 +1714,18 @@ static const char *set_num_daemons(cmd_parms *cmd, void *dummy, num_daemons = atoi(arg); if (num_daemons > server_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: NumServers of %d exceeds ServerLimit value " "of %d servers,", num_daemons, server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering NumServers to %d. To increase, please " "see the", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " ServerLimit directive."); num_daemons = server_limit; } else if (num_daemons < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require NumServers > 0, setting to 1"); num_daemons = 1; } @@ -1742,18 +1742,18 @@ static const char *set_threads_to_start(cmd_parms *cmd, void *dummy, threads_to_start = atoi(arg); if (threads_to_start > thread_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: StartThreads of %d exceeds ThreadLimit value" " of %d threads,", threads_to_start, thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering StartThreads to %d. To increase, please" " see the", thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " ThreadLimit directive."); } else if (threads_to_start < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require StartThreads > 0, setting to 1"); threads_to_start = 1; } @@ -1770,11 +1770,11 @@ static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, min_spare_threads = atoi(arg); if (min_spare_threads <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); min_spare_threads = 1; } @@ -1792,9 +1792,9 @@ static const char *set_max_spare_threads(cmd_parms *cmd, void *dummy, max_spare_threads = atoi(arg); if (max_spare_threads >= thread_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set higher than"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "ThreadLimit. Resetting to %d", thread_limit); max_spare_threads = thread_limit; } @@ -1810,9 +1810,9 @@ static const char *set_max_threads(cmd_parms *cmd, void *dummy, const char *arg) max_threads = atoi(arg); if (max_threads > thread_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MaxThreadsPerChild set higher than"); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "ThreadLimit. Resetting to %d", thread_limit); max_threads = thread_limit; } @@ -1906,15 +1906,15 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *ar server_limit = tmp_server_limit; if (server_limit > MAX_SERVER_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ServerLimit of %d exceeds compile time limit " "of %d servers,", server_limit, MAX_SERVER_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ServerLimit to %d.", MAX_SERVER_LIMIT); server_limit = MAX_SERVER_LIMIT; } else if (server_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ServerLimit > 0, setting to 1"); server_limit = 1; } @@ -1946,15 +1946,15 @@ static const char *set_thread_limit (cmd_parms *cmd, void *dummy, const char *ar thread_limit = tmp_thread_limit; if (thread_limit > MAX_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadLimit of %d exceeds compile time limit " "of %d servers,", thread_limit, MAX_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ThreadLimit to %d.", MAX_THREAD_LIMIT); thread_limit = MAX_THREAD_LIMIT; } else if (thread_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadLimit > 0, setting to 1"); thread_limit = 1; } diff --git a/server/mpm/experimental/threadpool/threadpool.c b/server/mpm/experimental/threadpool/threadpool.c index f1b496c6b3..5692885c30 100644 --- a/server/mpm/experimental/threadpool/threadpool.c +++ b/server/mpm/experimental/threadpool/threadpool.c @@ -540,7 +540,7 @@ static void sig_coredump(int sig) apr_filepath_set(ap_coredump_dir, pconf); apr_signal(sig, SIG_DFL); if (ap_my_pid == parent_pid) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "seg fault or similar nasty error detected " "in the parent process"); @@ -777,7 +777,7 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num, apr_os_sock_get(&csd, sock); if (csd >= FD_SETSIZE) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "new file descriptor %d is too large; you probably need " "to rebuild Apache with a larger FD_SETSIZE " "(currently %d)", @@ -1159,7 +1159,7 @@ static void * APR_THREAD_FUNC start_threads(apr_thread_t *thd, void *dummy) idle_worker_stack = worker_stack_create(pchild, ap_threads_per_child); if (idle_worker_stack == NULL) { - ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, ap_server_conf, "worker_stack_create() failed"); clean_child_exit(APEXIT_CHILDFATAL); } @@ -1509,7 +1509,7 @@ static int make_child(server_rec *s, int slot) int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "processor unbind failed %d", status); #endif @@ -1654,7 +1654,7 @@ static void perform_idle_server_maintenance(void) static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); @@ -1667,7 +1667,7 @@ static void perform_idle_server_maintenance(void) free_length = idle_spawn_rate; } if (idle_spawn_rate >= 8) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "server seems busy, (you may need " "to increase StartServers, ThreadsPerChild " @@ -1744,7 +1744,7 @@ static void server_main_loop(int remaining_children_to_start) /* Great, we've probably just lost a slot in the * scoreboard. Somehow we don't know about this child. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "long lost child came home! (pid %ld)", (long)pid.pid); @@ -1784,7 +1784,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) first_server_limit = server_limit; first_thread_limit = thread_limit; if (changed_limit_at_restart) { - ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, 0, s, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "WARNING: Attempt to change ServerLimit or ThreadLimit " "ignored during restart"); changed_limit_at_restart = 0; @@ -1855,13 +1855,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) hold_off_on_exponential_spawning = 10; } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif restart_pending = shutdown_pending = 0; @@ -1882,12 +1882,12 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) const char *pidfile = NULL; pidfile = ap_server_root_relative (pconf, ap_pid_fname); if ( pidfile != NULL && unlink(pidfile) == 0) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); } return 1; @@ -1909,7 +1909,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_scoreboard_image->global->running_generation = ap_my_generation; if (is_graceful) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, AP_SIG_GRACEFUL_STRING " received. Doing graceful restart"); /* wake up the children...time to die. But we'll have more soon */ ap_mpm_pod_killpg(pod, ap_daemons_limit, TRUE); @@ -1928,7 +1928,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_mpm_pod_killpg(pod, ap_daemons_limit, FALSE); ap_reclaim_child_processes(1); /* Start with SIGTERM */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "SIGHUP received. Attempting to restart"); } @@ -1947,7 +1947,7 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, ap_server_conf = s; if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT|APLOG_STARTUP, 0, + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, NULL, "no listening sockets available, shutting down"); return DONE; } @@ -2093,11 +2093,11 @@ static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, min_spare_threads = atoi(arg); if (min_spare_threads <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); min_spare_threads = 1; } @@ -2130,47 +2130,47 @@ static const char *set_max_clients (cmd_parms *cmd, void *dummy, * sure that it gets set before MaxClients in the pre_config stage. */ max_clients = atoi(arg); if (max_clients < ap_threads_per_child) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients (%d) must be at least as large", max_clients); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " large as ThreadsPerChild (%d). Automatically", ap_threads_per_child); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " increasing MaxClients to %d.", ap_threads_per_child); max_clients = ap_threads_per_child; } ap_daemons_limit = max_clients / ap_threads_per_child; if ((max_clients > 0) && (max_clients % ap_threads_per_child)) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients (%d) is not an integer multiple", max_clients); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " of ThreadsPerChild (%d), lowering MaxClients to %d", ap_threads_per_child, ap_daemons_limit * ap_threads_per_child); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " for a maximum of %d child processes,", ap_daemons_limit); max_clients = ap_daemons_limit * ap_threads_per_child; } if (ap_daemons_limit > server_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients of %d would require %d servers,", max_clients, ap_daemons_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " and would exceed the ServerLimit value of %d.", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " Automatically lowering MaxClients to %d. To increase,", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " please see the ServerLimit directive."); ap_daemons_limit = server_limit; } else if (ap_daemons_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require MaxClients > 0, setting to 1"); ap_daemons_limit = 1; } @@ -2187,19 +2187,19 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, ap_threads_per_child = atoi(arg); if (ap_threads_per_child > thread_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadsPerChild of %d exceeds ThreadLimit " "value of %d", ap_threads_per_child, thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "threads, lowering ThreadsPerChild to %d. To increase, please" " see the", thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " ThreadLimit directive."); ap_threads_per_child = thread_limit; } else if (ap_threads_per_child < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadsPerChild > 0, setting to 1"); ap_threads_per_child = 1; } @@ -2231,15 +2231,15 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *ar server_limit = tmp_server_limit; if (server_limit > MAX_SERVER_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ServerLimit of %d exceeds compile time limit " "of %d servers,", server_limit, MAX_SERVER_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ServerLimit to %d.", MAX_SERVER_LIMIT); server_limit = MAX_SERVER_LIMIT; } else if (server_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ServerLimit > 0, setting to 1"); server_limit = 1; } @@ -2271,15 +2271,15 @@ static const char *set_thread_limit (cmd_parms *cmd, void *dummy, const char *ar thread_limit = tmp_thread_limit; if (thread_limit > MAX_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadLimit of %d exceeds compile time limit " "of %d servers,", thread_limit, MAX_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ThreadLimit to %d.", MAX_THREAD_LIMIT); thread_limit = MAX_THREAD_LIMIT; } else if (thread_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadLimit > 0, setting to 1"); thread_limit = 1; } diff --git a/server/mpm/mpmt_os2/mpmt_os2.c b/server/mpm/mpmt_os2/mpmt_os2.c index 4609e7c91b..621675d36d 100644 --- a/server/mpm/mpmt_os2/mpmt_os2.c +++ b/server/mpm/mpmt_os2/mpmt_os2.c @@ -206,7 +206,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) is_parent_process = TRUE; if (ap_setup_listeners(ap_server_conf) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, "no listening sockets available, shutting down"); return 1; } @@ -221,12 +221,12 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) const char *pidfile = ap_server_root_relative(pconf, ap_pid_fname); if (pidfile != NULL && remove(pidfile) == 0) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, + ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf, "removed PID file %s (pid=%d)", pidfile, getpid()); } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); return 1; } @@ -253,7 +253,7 @@ static char master_main() set_signals(); if (ap_setup_listeners(ap_server_conf) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, "no listening sockets available, shutting down"); return FALSE; } @@ -310,13 +310,13 @@ static char master_main() } ap_scoreboard_image->global->restart_time = apr_time_now(); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif if (one_process) { @@ -548,11 +548,11 @@ static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, ap_min_spare_threads = atoi(arg); if (ap_min_spare_threads <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); ap_min_spare_threads = 1; } diff --git a/server/mpm/mpmt_os2/mpmt_os2_child.c b/server/mpm/mpmt_os2/mpmt_os2_child.c index 1b29c3aa08..8fa7016306 100644 --- a/server/mpm/mpmt_os2/mpmt_os2_child.c +++ b/server/mpm/mpmt_os2/mpmt_os2_child.c @@ -190,7 +190,7 @@ void ap_mpm_child_main(apr_pool_t *pconf) for (child_slot = 0; ap_scoreboard_image->parent[child_slot].pid != my_pid && child_slot < HARD_SERVER_LIMIT; child_slot++); if (child_slot == HARD_SERVER_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "child pid not found in scoreboard, exiting"); clean_child_exit(APEXIT_CHILDFATAL); } @@ -375,7 +375,7 @@ ULONG APIENTRY thread_exception_handler(EXCEPTIONREPORTRECORD *pReportRec, if (pReportRec->ExceptionNum == XCPT_ACCESS_VIOLATION || pReportRec->ExceptionNum == XCPT_INTEGER_DIVIDE_BY_ZERO) { - ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "caught exception in worker thread, initiating child shutdown pid=%d", getpid()); for (c=0; cservers[child_slot][c].tid == _gettid()) { diff --git a/server/mpm/netware/mpm_netware.c b/server/mpm/netware/mpm_netware.c index 5cedfe0b83..3bce826c1b 100644 --- a/server/mpm/netware/mpm_netware.c +++ b/server/mpm/netware/mpm_netware.c @@ -706,7 +706,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p) static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); reported = 1; @@ -715,7 +715,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p) } else { if (idle_spawn_rate >= 8) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "server seems busy, (you may need " "to increase StartServers, or Min/MaxSpareServers), " "spawning %d children, there are %d idle, and " @@ -850,7 +850,7 @@ static int setup_listeners(server_rec *s) int sockdes; if (ap_setup_listeners(s) < 1 ) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, 0, s, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, s, "no listening sockets available, shutting down"); return -1; } @@ -893,7 +893,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_server_conf = s; if (setup_listeners(s)) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, status, s, + ap_log_error(APLOG_MARK, APLOG_ALERT, status, s, "no listening sockets available, shutting down"); return -1; } @@ -923,13 +923,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) startup_workers(ap_threads_to_start); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif show_server_data(); @@ -947,7 +947,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) shutdown_listeners();*/ if (shutdown_pending) { /* Got an unload from the console */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); DBPRINT0 ("Shutdown pending. Waiting for threads to terminate...\n"); @@ -964,7 +964,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ++ap_my_generation; ap_scoreboard_image->global->running_generation = ap_my_generation; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "Graceful restart requested, doing restart"); /* Wait for all of the threads to terminate before initiating the restart */ @@ -1213,11 +1213,11 @@ static const char *set_min_free_threads(cmd_parms *cmd, void *dummy, const char ap_threads_min_free = atoi(arg); if (ap_threads_min_free <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareServers set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); ap_threads_min_free = 1; } @@ -1245,19 +1245,19 @@ static const char *set_thread_limit (cmd_parms *cmd, void *dummy, const char *ar ap_threads_limit = atoi(arg); if (ap_threads_limit > HARD_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxThreads of %d exceeds compile time limit " "of %d threads,", ap_threads_limit, HARD_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering MaxThreads to %d. To increase, please " "see the", HARD_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " HARD_THREAD_LIMIT define in %s.", AP_MPM_HARD_LIMITS_FILE); ap_threads_limit = HARD_THREAD_LIMIT; } else if (ap_threads_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require MaxThreads > 0, setting to 1"); ap_threads_limit = 1; } diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 9f3b17ae4b..adb3aae129 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -336,7 +336,7 @@ static void sig_coredump(int sig) chdir(ap_coredump_dir); apr_signal(sig, SIG_DFL); if (ap_my_pid == parent_pid) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "seg fault or similar nasty error detected " "in the parent process"); @@ -747,7 +747,7 @@ static int make_child(server_rec *s, int slot) int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "processor unbind failed %d", status); } #endif @@ -871,7 +871,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p) static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); reported = 1; @@ -880,7 +880,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p) } else { if (idle_spawn_rate >= 8) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "server seems busy, (you may need " "to increase StartServers, or Min/MaxSpareServers), " "spawning %d children, there are %d idle, and " @@ -892,7 +892,7 @@ static void perform_idle_server_maintenance(apr_pool_t *p) if (make_child(ap_server_conf, free_slots[i]) == -1) { if(free_length == 1) { shutdown_pending = 1; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, ap_server_conf, "No active child processes: shutting down"); } } @@ -930,7 +930,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) first_server_limit = server_limit; if (changed_limit_at_restart) { - ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, 0, s, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "WARNING: Attempt to change ServerLimit " "ignored during restart"); changed_limit_at_restart = 0; @@ -1005,13 +1005,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) hold_off_on_exponential_spawning = 10; } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif restart_pending = shutdown_pending = 0; @@ -1065,7 +1065,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) * scoreboard. Somehow we don't know about this * child. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "long lost child came home! (pid %ld)", (long)pid.pid); } @@ -1112,13 +1112,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) const char *pidfile = NULL; pidfile = ap_server_root_relative (pconf, ap_pid_fname); if ( pidfile != NULL && unlink(pidfile) == 0) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); return 1; } @@ -1138,7 +1138,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_scoreboard_image->global->running_generation = ap_my_generation; if (is_graceful) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "Graceful restart requested, doing restart"); /* kill off the idle ones */ @@ -1161,7 +1161,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "killpg SIGHUP"); } ap_reclaim_child_processes(0); /* Not when just starting up */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "SIGHUP received. Attempting to restart"); } @@ -1179,7 +1179,7 @@ static int prefork_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, ap_server_conf = s; if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT|APLOG_STARTUP, 0, + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, NULL, "no listening sockets available, shutting down"); return DONE; } @@ -1280,11 +1280,11 @@ static const char *set_min_free_servers(cmd_parms *cmd, void *dummy, const char ap_daemons_min_free = atoi(arg); if (ap_daemons_min_free <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareServers set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); ap_daemons_min_free = 1; } @@ -1312,18 +1312,18 @@ static const char *set_max_clients (cmd_parms *cmd, void *dummy, const char *arg ap_daemons_limit = atoi(arg); if (ap_daemons_limit > server_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients of %d exceeds ServerLimit value " "of %d servers,", ap_daemons_limit, server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering MaxClients to %d. To increase, please " "see the ServerLimit", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " directive."); ap_daemons_limit = server_limit; } else if (ap_daemons_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require MaxClients > 0, setting to 1"); ap_daemons_limit = 1; } @@ -1355,15 +1355,15 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *ar server_limit = tmp_server_limit; if (server_limit > MAX_SERVER_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ServerLimit of %d exceeds compile time limit " "of %d servers,", server_limit, MAX_SERVER_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ServerLimit to %d.", MAX_SERVER_LIMIT); server_limit = MAX_SERVER_LIMIT; } else if (server_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ServerLimit > 0, setting to 1"); server_limit = 1; } diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 511fa21c07..b39472570c 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -177,18 +177,18 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, char *arg ap_threads_per_child = atoi(arg); if (ap_threads_per_child > HARD_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadsPerChild of %d exceeds compile time" " limit of %d threads,", ap_threads_per_child, HARD_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ThreadsPerChild to %d. To increase, please" " see the HARD_THREAD_LIMIT define in %s.", HARD_THREAD_LIMIT, AP_MPM_HARD_LIMITS_FILE); ap_threads_per_child = HARD_THREAD_LIMIT; } else if (ap_threads_per_child < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadsPerChild > 0, setting to 1"); ap_threads_per_child = 1; } @@ -249,7 +249,7 @@ AP_DECLARE(PCOMP_CONTEXT) mpm_get_completion_context(void) if (num_completion_contexts >= ap_threads_per_child) { static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "Server ran out of threads to serve requests. Consider " "raising the ThreadsPerChild setting"); reported = 1; @@ -558,10 +558,10 @@ static int set_listeners_noninheritable(apr_pool_t *p) } if (my_pid == parent_pid) { - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "Parent: Marked listeners as not inheritable."); } else { - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "Child %d: Marked listeners as not inheritable.", my_pid); } return 1; @@ -637,7 +637,7 @@ void get_handles_from_parent(server_rec *s) */ ap_init_scoreboard(sb_shared); - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "Child %d: Retrieved our scoreboard from the parent.", my_pid); } @@ -687,7 +687,7 @@ void get_listeners_from_parent(server_rec *s) apr_os_sock_put(&lr->sd, &nsd, s->process->pool); } - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "Child %d: retrieved %d listeners from parent", my_pid, lcnt); if (!set_listeners_noninheritable(s->process->pool)) { @@ -735,7 +735,7 @@ static void add_job(int sock) new_job = (joblist *) malloc(sizeof(joblist)); if (new_job == NULL) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Ouch! Out of memory in add_job()!"); return; } @@ -1386,7 +1386,7 @@ static void child_main() */ rv = apr_proc_mutex_unlock(start_mutex); if (rv == APR_SUCCESS) { - ap_log_error(APLOG_MARK,APLOG_NOTICE | APLOG_NOERRNO, rv, ap_server_conf, + ap_log_error(APLOG_MARK,APLOG_NOTICE, rv, ap_server_conf, "Child %d: Released the start mutex", my_pid); } else { @@ -1501,7 +1501,7 @@ static int send_handles_to_child(apr_pool_t *p, HANDLE child_exit_event, HANDLE return -1; } - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "Parent: Sent the scoreboard to the child"); return 0; } @@ -1541,7 +1541,7 @@ static int send_listeners_to_child(apr_pool_t *p, DWORD dwProcessId, HANDLE hPip } } - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "Parent: Sent %d listeners to child %d", lcnt, dwProcessId); return 0; } @@ -1647,7 +1647,7 @@ static int create_process(apr_pool_t *p, HANDLE *child_proc, HANDLE *child_exit_ return -1; } else if (hShareError == INVALID_HANDLE_VALUE) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf, "Parent: Failed to share error log with child.\n"); CloseHandle(hPipeWrite); CloseHandle(hPipeRead); @@ -1882,7 +1882,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even else if (cld == SHUTDOWN_HANDLE) { /* shutdown_event signalled */ shutdown_pending = 1; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, APR_SUCCESS, s, + ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, s, "Parent: Received shutdown signal -- Shutting down the server."); if (ResetEvent(shutdown_event) == 0) { ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s, @@ -1894,7 +1894,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even * then signal the child process to exit. */ restart_pending = 1; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, s, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, "Parent: Received restart signal -- Restarting the server."); if (ResetEvent(restart_event) == 0) { ap_log_error(APLOG_MARK, APLOG_ERR, apr_get_os_error(), s, @@ -1921,13 +1921,13 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even if ( exitcode == APEXIT_CHILDFATAL || exitcode == APEXIT_CHILDINIT || exitcode == APEXIT_INIT) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "Parent: child process exited with status %u -- Aborting.", exitcode); } else { int i; restart_pending = 1; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, APR_SUCCESS, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, APR_SUCCESS, ap_server_conf, "Parent: child process exited with status %u -- Restarting.", exitcode); for (i = 0; i < ap_threads_per_child; i++) { ap_update_child_status_from_indexes(0, i, SERVER_DEAD, NULL); @@ -1960,13 +1960,13 @@ die_now: if (event_handles[CHILD_HANDLE]) { rv = WaitForSingleObject(event_handles[CHILD_HANDLE], timeout); if (rv == WAIT_OBJECT_0) { - ap_log_error(APLOG_MARK,APLOG_NOTICE|APLOG_NOERRNO, APR_SUCCESS, ap_server_conf, + ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf, "Parent: Child process exited successfully."); CloseHandle(event_handles[CHILD_HANDLE]); event_handles[CHILD_HANDLE] = NULL; } else { - ap_log_error(APLOG_MARK,APLOG_NOTICE|APLOG_NOERRNO, APR_SUCCESS, ap_server_conf, + ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf, "Parent: Forcing termination of child process %d ", event_handles[CHILD_HANDLE]); TerminateProcess(event_handles[CHILD_HANDLE], 1); CloseHandle(event_handles[CHILD_HANDLE]); @@ -2248,7 +2248,7 @@ void winnt_rewrite_args(process_rec *process) rv = mpm_merge_service_args(process->pool, mpm_new_argv, fixed_args); if (rv == APR_SUCCESS) { - ap_log_error(APLOG_MARK,APLOG_NOERRNO|APLOG_INFO, 0, NULL, + ap_log_error(APLOG_MARK,APLOG_INFO, 0, NULL, "Using ConfigArgs of the installed service " "\"%s\".", service_name); } @@ -2468,7 +2468,7 @@ static int winnt_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, s } if (ap_setup_listeners(s) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT|APLOG_STARTUP, 0, + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, NULL, "no listening sockets available, shutting down"); return DONE; } @@ -2556,7 +2556,7 @@ AP_DECLARE(int) ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s ) const char *pidfile = ap_server_root_relative (pconf, ap_pid_fname); if (pidfile != NULL && unlink(pidfile) == 0) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, + ap_log_error(APLOG_MARK, APLOG_INFO, APR_SUCCESS, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, GetCurrentProcessId()); } diff --git a/server/mpm/winnt/registry.c b/server/mpm/winnt/registry.c index 763bd76315..b71831653a 100644 --- a/server/mpm/winnt/registry.c +++ b/server/mpm/winnt/registry.c @@ -346,7 +346,7 @@ apr_status_t ap_registry_store_value(const char *key, const char *name, const ch (DWORD) strlen(value) + 1); /* for size of "value" */ if (rv == ERROR_SUCCESS) { - ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO,rv,NULL, + ap_log_error(APLOG_MARK,APLOG_INFO,rv,NULL, "Registry stored HKLM\\" REGKEY "\\%s value %s", key, value); } @@ -418,7 +418,7 @@ apr_status_t ap_registry_store_array(apr_pool_t *p, (DWORD) bufsize); /* for size of "value" */ if (rv == ERROR_SUCCESS) { - ap_log_error(APLOG_MARK,APLOG_INFO|APLOG_NOERRNO,rv,NULL, + ap_log_error(APLOG_MARK,APLOG_INFO,rv,NULL, "Registry stored HKLM\\" REGKEY "\\%s", key); } diff --git a/server/mpm/winnt/service.c b/server/mpm/winnt/service.c index 6e6da38c05..d6f3b60073 100644 --- a/server/mpm/winnt/service.c +++ b/server/mpm/winnt/service.c @@ -622,7 +622,7 @@ apr_status_t mpm_merge_service_args(apr_pool_t *p, rv = ap_registry_get_array(p, conf_key, "ConfigArgs", &svc_args); if (rv != APR_SUCCESS) { if (rv == ERROR_FILE_NOT_FOUND) { - ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, NULL, "No ConfigArgs registered for %s, perhaps " "this service is not installed?", mpm_service_name); diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 5c3d2acf21..913273e56c 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -379,7 +379,7 @@ static void sig_coredump(int sig) apr_filepath_set(ap_coredump_dir, pconf); apr_signal(sig, SIG_DFL); if (ap_my_pid == parent_pid) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "seg fault or similar nasty error detected " "in the parent process"); @@ -616,7 +616,7 @@ static void process_socket(apr_pool_t *p, apr_socket_t *sock, int my_child_num, apr_os_sock_get(&csd, sock); if (csd >= FD_SETSIZE) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, "new file descriptor %d is too large; you probably need " "to rebuild Apache with a larger FD_SETSIZE " "(currently %d)", @@ -1366,7 +1366,7 @@ static int make_child(server_rec *s, int slot) int status = bindprocessor(BINDPROCESS, (int)getpid(), PROCESSOR_CLASS_ANY); if (status != OK) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, "processor unbind failed %d", status); #endif @@ -1511,7 +1511,7 @@ static void perform_idle_server_maintenance(void) static int reported = 0; if (!reported) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "server reached MaxClients setting, consider" " raising the MaxClients setting"); @@ -1524,7 +1524,7 @@ static void perform_idle_server_maintenance(void) free_length = idle_spawn_rate; } if (idle_spawn_rate >= 8) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "server seems busy, (you may need " "to increase StartServers, ThreadsPerChild " @@ -1601,7 +1601,7 @@ static void server_main_loop(int remaining_children_to_start) /* Great, we've probably just lost a slot in the * scoreboard. Somehow we don't know about this child. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "long lost child came home! (pid %ld)", (long)pid.pid); @@ -1641,7 +1641,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) first_server_limit = server_limit; first_thread_limit = thread_limit; if (changed_limit_at_restart) { - ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, 0, s, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, "WARNING: Attempt to change ServerLimit or ThreadLimit " "ignored during restart"); changed_limit_at_restart = 0; @@ -1712,13 +1712,13 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) hold_off_on_exponential_spawning = 10; } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "%s configured -- resuming normal operations", ap_get_server_version()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "Server built: %s", ap_get_server_built()); #ifdef AP_MPM_WANT_SET_ACCEPT_LOCK_MECH - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, "AcceptMutex: %s", ap_valid_accept_mutex_string); #endif restart_pending = shutdown_pending = 0; @@ -1739,12 +1739,12 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) const char *pidfile = NULL; pidfile = ap_server_root_relative (pconf, ap_pid_fname); if ( pidfile != NULL && unlink(pidfile) == 0) - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, + ap_log_error(APLOG_MARK, APLOG_INFO, 0, ap_server_conf, "removed PID file %s (pid=%ld)", pidfile, (long)getpid()); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); } return 1; @@ -1766,7 +1766,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_scoreboard_image->global->running_generation = ap_my_generation; if (is_graceful) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, AP_SIG_GRACEFUL_STRING " received. Doing graceful restart"); /* wake up the children...time to die. But we'll have more soon */ ap_mpm_pod_killpg(pod, ap_daemons_limit, TRUE); @@ -1785,7 +1785,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_mpm_pod_killpg(pod, ap_daemons_limit, FALSE); ap_reclaim_child_processes(1); /* Start with SIGTERM */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, ap_server_conf, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "SIGHUP received. Attempting to restart"); } @@ -1803,7 +1803,7 @@ static int worker_open_logs(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, ap_server_conf = s; if ((num_listensocks = ap_setup_listeners(ap_server_conf)) < 1) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT|APLOG_STARTUP, 0, + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, NULL, "no listening sockets available, shutting down"); return DONE; } @@ -1943,11 +1943,11 @@ static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, min_spare_threads = atoi(arg); if (min_spare_threads <= 0) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: detected MinSpareThreads set to non-positive."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Resetting to 1 to avoid almost certain Apache failure."); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "Please read the documentation."); min_spare_threads = 1; } @@ -1980,47 +1980,47 @@ static const char *set_max_clients (cmd_parms *cmd, void *dummy, * sure that it gets set before MaxClients in the pre_config stage. */ max_clients = atoi(arg); if (max_clients < ap_threads_per_child) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients (%d) must be at least as large", max_clients); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " large as ThreadsPerChild (%d). Automatically", ap_threads_per_child); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " increasing MaxClients to %d.", ap_threads_per_child); max_clients = ap_threads_per_child; } ap_daemons_limit = max_clients / ap_threads_per_child; if ((max_clients > 0) && (max_clients % ap_threads_per_child)) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients (%d) is not an integer multiple", max_clients); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " of ThreadsPerChild (%d), lowering MaxClients to %d", ap_threads_per_child, ap_daemons_limit * ap_threads_per_child); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " for a maximum of %d child processes,", ap_daemons_limit); max_clients = ap_daemons_limit * ap_threads_per_child; } if (ap_daemons_limit > server_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: MaxClients of %d would require %d servers,", max_clients, ap_daemons_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " and would exceed the ServerLimit value of %d.", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " Automatically lowering MaxClients to %d. To increase,", server_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " please see the ServerLimit directive."); ap_daemons_limit = server_limit; } else if (ap_daemons_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require MaxClients > 0, setting to 1"); ap_daemons_limit = 1; } @@ -2037,19 +2037,19 @@ static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, ap_threads_per_child = atoi(arg); if (ap_threads_per_child > thread_limit) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadsPerChild of %d exceeds ThreadLimit " "value of %d", ap_threads_per_child, thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "threads, lowering ThreadsPerChild to %d. To increase, please" " see the", thread_limit); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " ThreadLimit directive."); ap_threads_per_child = thread_limit; } else if (ap_threads_per_child < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadsPerChild > 0, setting to 1"); ap_threads_per_child = 1; } @@ -2081,15 +2081,15 @@ static const char *set_server_limit (cmd_parms *cmd, void *dummy, const char *ar server_limit = tmp_server_limit; if (server_limit > MAX_SERVER_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ServerLimit of %d exceeds compile time limit " "of %d servers,", server_limit, MAX_SERVER_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ServerLimit to %d.", MAX_SERVER_LIMIT); server_limit = MAX_SERVER_LIMIT; } else if (server_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ServerLimit > 0, setting to 1"); server_limit = 1; } @@ -2121,15 +2121,15 @@ static const char *set_thread_limit (cmd_parms *cmd, void *dummy, const char *ar thread_limit = tmp_thread_limit; if (thread_limit > MAX_THREAD_LIMIT) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: ThreadLimit of %d exceeds compile time limit " "of %d servers,", thread_limit, MAX_THREAD_LIMIT); - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, " lowering ThreadLimit to %d.", MAX_THREAD_LIMIT); thread_limit = MAX_THREAD_LIMIT; } else if (thread_limit < 1) { - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "WARNING: Require ThreadLimit > 0, setting to 1"); thread_limit = 1; } diff --git a/server/mpm_common.c b/server/mpm_common.c index f1f98f9bbc..fd1f3dd394 100644 --- a/server/mpm_common.c +++ b/server/mpm_common.c @@ -143,7 +143,7 @@ void ap_reclaim_child_processes(int terminate) case 6: /* 344ms */ case 7: /* 1.4sec */ /* ok, now it's being annoying */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, ap_server_conf, "child process %ld still did not exit, " "sending a SIGTERM", @@ -153,7 +153,7 @@ void ap_reclaim_child_processes(int terminate) case 8: /* 6 sec */ /* die child scum */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "child process %ld still did not exit, " "sending a SIGKILL", @@ -177,7 +177,7 @@ void ap_reclaim_child_processes(int terminate) * exited, we will likely fail to bind to the port * after the restart. */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, "could not make child process %ld exit, " "attempting to continue anyway", @@ -258,7 +258,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status) } if (status == APEXIT_CHILDFATAL) { - ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, ap_server_conf, "Child %" APR_PID_T_FMT " returned a Fatal error..." APR_EOL_STR @@ -280,7 +280,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status) default: if (APR_PROC_CHECK_CORE_DUMP(why)) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "child pid %ld exit signal %s (%d), " "possible coredump in %s", @@ -288,7 +288,7 @@ int ap_process_child_status(apr_proc_t *pid, apr_exit_why_e why, int status) ap_coredump_dir); } else { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "child pid %ld exit signal %s (%d)", (long)pid->pid, sigdesc, signum); @@ -329,7 +329,7 @@ AP_DECLARE(uid_t) ap_uname2id(const char *name) return (atoi(&name[1])); if (!(ent = getpwnam(name))) { - ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "%s: bad user name %s", ap_server_argv0, name); exit(1); } @@ -347,7 +347,7 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name) return (atoi(&name[1])); if (!(ent = getgrnam(name))) { - ap_log_error(APLOG_MARK, APLOG_STARTUP|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, "%s: bad group name %s", ap_server_argv0, name); exit(1); } diff --git a/server/protocol.c b/server/protocol.c index 4178dcbe03..9a80a617fc 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -882,7 +882,7 @@ request_rec *ap_read_request(conn_rec *conn) /* Get the request... */ if (!read_request_line(r)) { if (r->status == HTTP_REQUEST_URI_TOO_LARGE) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "request failed: URI too long"); ap_send_error_response(r, 0); ap_run_log_transaction(r); @@ -895,7 +895,7 @@ request_rec *ap_read_request(conn_rec *conn) if (!r->assbackwards) { ap_get_mime_headers(r); if (r->status != HTTP_REQUEST_TIME_OUT) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "request failed: error reading the headers"); ap_send_error_response(r, 0); ap_run_log_transaction(r); @@ -909,7 +909,7 @@ request_rec *ap_read_request(conn_rec *conn) * headers! Have to dink things just to make sure the error message * comes through... */ - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "client sent invalid HTTP/0.9 request: HEAD %s", r->uri); r->header_only = 0; @@ -941,7 +941,7 @@ request_rec *ap_read_request(conn_rec *conn) * a Host: header, and the server MUST respond with 400 if it doesn't. */ r->status = HTTP_BAD_REQUEST; - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "client sent HTTP/1.1 request without hostname " "(see RFC2616 section 14.23): %s", r->uri); } @@ -965,7 +965,7 @@ request_rec *ap_read_request(conn_rec *conn) } else { r->status = HTTP_EXPECTATION_FAILED; - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "client sent an unrecognized expectation value of " "Expect: %s", expect); ap_send_error_response(r, 0); @@ -1067,7 +1067,7 @@ AP_DECLARE(void) ap_note_auth_failure(request_rec *r) ap_note_digest_auth_failure(r); } else { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "need AuthType to note auth failure: %s", r->uri); } } @@ -1110,7 +1110,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) return DECLINED; if (!ap_auth_name(r)) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "need AuthName: %s", r->uri); return HTTP_INTERNAL_SERVER_ERROR; } @@ -1122,7 +1122,7 @@ AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw) if (strcasecmp(ap_getword(r->pool, &auth_line, ' '), "Basic")) { /* Client tried to authenticate using wrong auth scheme */ - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "client used wrong authentication scheme: %s", r->uri); ap_note_basic_auth_failure(r); return HTTP_UNAUTHORIZED; diff --git a/server/request.c b/server/request.c index 1a6aea9a3d..4cd55af78c 100644 --- a/server/request.c +++ b/server/request.c @@ -126,7 +126,7 @@ AP_IMPLEMENT_HOOK_RUN_ALL(int, create_request, static int decl_die(int status, char *phase, request_rec *r) { if (status == DECLINED) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, "configuration error: couldn't %s: %s", phase, r->uri); return HTTP_INTERNAL_SERVER_ERROR; } @@ -371,7 +371,7 @@ static int check_safe_file(request_rec *r) return OK; } - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "object is not a file, directory or symlink: %s", r->filename); return HTTP_FORBIDDEN; @@ -487,7 +487,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) * handler. Leave INFO notes here for module debugging. */ if (r->filename == NULL) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Module bug? Request filename is missing for URI %s", r->uri); return OK; @@ -500,7 +500,7 @@ AP_DECLARE(int) ap_directory_walk(request_rec *r) if ((rv = apr_filepath_merge(&entry_dir, NULL, r->filename, APR_FILEPATH_NOTRELATIVE, r->pool)) != APR_SUCCESS) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, "Module bug? Request filename path %s is invalid or " "or not absolute for uri %s", r->filename, r->uri); @@ -1029,7 +1029,7 @@ minimerge2: */ if ((res = resolve_symlink(r->filename, &thisinfo, opts, r->pool)) != OK) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Symbolic link not allowed: %s", r->filename); return r->status = res; @@ -1043,7 +1043,7 @@ minimerge2: break; } else if (thisinfo.filetype != APR_DIR) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "symlink doesn't point to a file or " "directory: %s", r->filename); @@ -1146,7 +1146,7 @@ minimerge2: x if (r->finfo.filetype != APR_DIR x && (res = resolve_symlink(r->filename, r->info, ap_allow_options(r), x r->pool))) { - x ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + x ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, x "Symbolic link not allowed: %s", r->filename); x return res; x } diff --git a/server/scoreboard.c b/server/scoreboard.c index 75c317b44f..394824c502 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -253,7 +253,7 @@ apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached) return APR_SUCCESS; } if (apr_shm_size_get(ap_scoreboard_shm) < scoreboard_size) { - ap_log_error(APLOG_MARK, APLOG_CRIT | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "Fatal error: shared scoreboard too small for child!"); apr_shm_detach(ap_scoreboard_shm); ap_scoreboard_shm = NULL; @@ -323,7 +323,7 @@ int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e sb_type) /* A simple malloc will suffice */ void *sb_mem = calloc(1, scoreboard_size); if (sb_mem == NULL) { - ap_log_error(APLOG_MARK, APLOG_CRIT | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_CRIT, 0, NULL, "(%d)%s: cannot allocate scoreboard", errno, strerror(errno)); return HTTP_INTERNAL_SERVER_ERROR; diff --git a/server/util.c b/server/util.c index 4544551e15..65c695a5cb 100644 --- a/server/util.c +++ b/server/util.c @@ -836,7 +836,7 @@ AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word) AP_DECLARE(int) ap_cfg_closefile(ap_configfile_t *cfp) { #ifdef DEBUG - ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Done with config file %s", cfp->name); #endif return (cfp->close == NULL) ? 0 : cfp->close(cfp->param); @@ -879,14 +879,14 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg, apr_pool_t #endif if (name == NULL) { - ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Internal error: pcfg_openfile() called with NULL filename"); return APR_EBADF; } status = apr_file_open(&file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p); #ifdef DEBUG - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Opening config file %s (%s)", name, (status != APR_SUCCESS) ? apr_strerror(status, buf, sizeof(buf)) : "successful"); @@ -904,7 +904,7 @@ AP_DECLARE(apr_status_t) ap_pcfg_openfile(ap_configfile_t **ret_cfg, apr_pool_t #else strcmp(name, "/dev/null") != 0) { #endif /* WIN32 || OS2 */ - ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Access to file %s denied by server: not a regular file", name); apr_file_close(file); @@ -955,7 +955,7 @@ AP_DECLARE(ap_configfile_t *) ap_pcfg_open_custom(apr_pool_t *p, const char *des { ap_configfile_t *new_cfg = apr_palloc(p, sizeof(*new_cfg)); #ifdef DEBUG - ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, NULL, "Opening config handler %s", descr); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Opening config handler %s", descr); #endif new_cfg->param = param; new_cfg->name = descr; @@ -1042,7 +1042,7 @@ AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp) ; #ifdef DEBUG_CFG_LINES - ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "Read config: %s", buf); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Read config: %s", buf); #endif return 0; } else { @@ -1099,7 +1099,7 @@ AP_DECLARE(int) ap_cfg_getline(char *buf, size_t bufsize, ap_configfile_t *cfp) --i; buf[i] = '\0'; #ifdef DEBUG_CFG_LINES - ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL, "Read config: %s", buf); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL, "Read config: %s", buf); #endif return 0; } @@ -1845,7 +1845,7 @@ char *ap_get_local_host(apr_pool_t *a) if (!server_hostname) server_hostname = apr_pstrdup(a, "127.0.0.1"); - ap_log_perror(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO|APLOG_STARTUP, 0, a, + ap_log_perror(APLOG_MARK, APLOG_ALERT|APLOG_STARTUP, 0, a, "%s: Could not determine the server's fully qualified " "domain name, using %s for ServerName", ap_server_argv0, server_hostname); diff --git a/server/util_filter.c b/server/util_filter.c index adb4a46a67..314ff69695 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -306,7 +306,7 @@ static ap_filter_t *add_any_filter_handle(ap_filter_rec_t *frec, void *ctx, outf = r_filters; } else { - ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "a content filter was added without a request: %s", frec->name); return NULL; } @@ -316,7 +316,7 @@ static ap_filter_t *add_any_filter_handle(ap_filter_rec_t *frec, void *ctx, outf = p_filters; } else { - ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "a protocol filter was added without a request: %s", frec->name); return NULL; } @@ -412,7 +412,7 @@ static ap_filter_t *add_any_filter(const char *name, void *ctx, } } - ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, NULL, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "an unknown filter was not added: %s", name); return NULL; } diff --git a/server/util_script.c b/server/util_script.c index 56a316628b..949cd38b1e 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -455,7 +455,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, while (1) { if ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data) == 0) { - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR|APLOG_TOCLIENT, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r, "Premature end of script headers: %s", apr_filename_of_pathname(r->filename)); return HTTP_INTERNAL_SERVER_ERROR; @@ -525,7 +525,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, ++maybeASCII; } if (maybeASCII > maybeEBCDIC) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r->server, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, "CGI Interface Error: Script headers apparently ASCII: (CGI = %s)", r->filename); inbytes_left = outbytes_left = cp - w; @@ -548,7 +548,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, } } - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR|APLOG_TOCLIENT, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r, "%s: %s", malformed, apr_filename_of_pathname(r->filename)); return HTTP_INTERNAL_SERVER_ERROR; diff --git a/server/util_xml.c b/server/util_xml.c index 6b3a5e3d58..2fb194af2b 100644 --- a/server/util_xml.c +++ b/server/util_xml.c @@ -95,7 +95,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc) while ((len = ap_get_client_block(r, buffer, READ_BLOCKSIZE)) > 0) { total_read += len; if (limit_xml_body && total_read > limit_xml_body) { - ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "XML request body is larger than the configured " "limit of %lu", (unsigned long)limit_xml_body); goto read_error; @@ -114,7 +114,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc) /* tell the parser that we're done */ status = apr_xml_parser_done(parser, pdoc); if (status) { - ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "XML parser error (at end). status=%d", status); return HTTP_BAD_REQUEST; } @@ -123,7 +123,7 @@ AP_DECLARE(int) ap_xml_parse_input(request_rec * r, apr_xml_doc **pdoc) parser_error: (void) apr_xml_parser_geterror(parser, errbuf, sizeof(errbuf)); - ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "%s", errbuf); /* FALLTHRU */ diff --git a/server/vhost.c b/server/vhost.c index aadc19288a..07d7e2e0f4 100644 --- a/server/vhost.c +++ b/server/vhost.c @@ -339,7 +339,7 @@ static void dump_iphash_statistics(server_rec *main_s) } p += apr_snprintf(p, sizeof(buf) - (p - buf), " %ux%u", total, count[IPHASH_TABLE_SIZE - 1]); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_DEBUG, main_s, buf); + ap_log_error(APLOG_MARK, APLOG_DEBUG, main_s, buf); } #endif @@ -517,7 +517,7 @@ static int add_name_vhost_config(apr_pool_t *p, server_rec *main_s, ic->server = s; if (sar->host_port != ic->sar->host_port) { /* one of the two is a * port, the other isn't */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_s, + ap_log_error(APLOG_MARK, APLOG_ERR, 0, main_s, "VirtualHost %s:%u -- mixing * " "ports and non-* ports with " "a NameVirtualHost address is not supported," @@ -538,7 +538,7 @@ static void remove_unused_name_vhosts(server_rec *main_s, ipaddr_chain **pic) ipaddr_chain *ic = *pic; if (ic->server == NULL) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, main_s, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_s, "NameVirtualHost %s:%u has no VirtualHosts", ic->sar->virthost, ic->sar->host_port); *pic = ic->next; @@ -624,7 +624,7 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s) ic = find_default_server(sar->host_port); if (!ic || !add_name_vhost_config(p, main_s, s, sar, ic)) { if (ic && ic->sar->host_port != 0) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_s, "_default_ VirtualHost " "overlap on port %u, the first has " "precedence", sar->host_port); @@ -647,7 +647,7 @@ AP_DECLARE(void) ap_fini_vhost_config(apr_pool_t *p, server_rec *main_s) *iphash_table_tail[bucket] = ic; } else if (!add_name_vhost_config(p, main_s, s, sar, ic)) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, main_s, "VirtualHost %s:%u overlaps " "with VirtualHost %s:%u, the first has " "precedence, perhaps you need a " @@ -796,7 +796,7 @@ static void fix_hostname(request_rec *r) bad: r->status = HTTP_BAD_REQUEST; - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "Client sent malformed Host header"); return; } -- 2.50.1