diff options
author | Jeff Trawick <trawick@apache.org> | 2009-04-05 19:54:22 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2009-04-05 19:54:22 +0200 |
commit | d1c34162827dbdb234f676727633040cf293dab2 (patch) | |
tree | 42cf899bbbbf29216174ac9f66f20a2513113e71 /server/mpm/prefork | |
parent | the only "retuned" in the entire server was, alas, not meant to be (diff) | |
download | apache2-d1c34162827dbdb234f676727633040cf293dab2.tar.xz apache2-d1c34162827dbdb234f676727633040cf293dab2.zip |
main() can use ap_run_mpm() directly, so axe the old ap_mpm_run() function
change the mpm hooks to return OK/DONE instead of 0/1
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@762127 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm/prefork')
-rw-r--r-- | server/mpm/prefork/prefork.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 3b9d4fd6cb..d1559c7997 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -915,7 +915,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) "Couldn't create accept lock (%s) (%d)", ap_lock_fname, ap_accept_lock_mech); mpm_state = AP_MPMQ_STOPPING; - return 1; + return DONE; } #if APR_USE_SYSVSEM_SERIALIZE @@ -930,14 +930,14 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) "Couldn't set permissions on cross-process lock; " "check User and Group directives"); mpm_state = AP_MPMQ_STOPPING; - return 1; + return DONE; } } if (!is_graceful) { if (ap_run_pre_mpm(s->process->pool, SB_SHARED) != OK) { mpm_state = AP_MPMQ_STOPPING; - return 1; + return DONE; } /* fix the generation number in the global score; we just got a new, * cleared scoreboard @@ -1008,7 +1008,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) processed_status = ap_process_child_status(&pid, exitwhy, status); if (processed_status == APEXIT_CHILDFATAL) { mpm_state = AP_MPMQ_STOPPING; - return 1; + return DONE; } /* non-fatal death... note that it's gone in the scoreboard. */ @@ -1095,7 +1095,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, ap_server_conf, "caught SIGTERM, shutting down"); - return 1; + return DONE; } else if (shutdown_pending) { /* Time to perform a graceful shut down: * Reap the inactive children, and ask the active ones @@ -1169,7 +1169,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) */ ap_unixd_killpg(getpgrp(), SIGTERM); - return 1; + return DONE; } /* we've been told to restart */ @@ -1177,7 +1177,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) apr_signal(AP_SIG_GRACEFUL, SIG_IGN); if (one_process) { /* not worth thinking about */ - return 1; + return DONE; } /* advance to the next generation */ @@ -1223,7 +1223,7 @@ static int prefork_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) "SIGHUP received. Attempting to restart"); } - return 0; + return OK; } /* This really should be a post_config hook, but the error log is already |