Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 64167 invoked by uid 500); 3 Apr 2002 13:45:58 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 64156 invoked by uid 500); 3 Apr 2002 13:45:58 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 3 Apr 2002 13:45:58 -0000 Message-ID: <20020403134558.96674.qmail@icarus.apache.org> From: trawick@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server/mpm/prefork prefork.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N trawick 02/04/03 05:45:58 Modified: server/mpm/prefork prefork.c Log: prefork MPM: add -DFOREGROUND option to use when you want the parent process to run in the foreground (NO_DETACH is a special mode for running under programs like daemontools) the existing flag -DDEBUG turns on FOREGROUND now instead of NO_DETACH Revision Changes Path 1.259 +6 -4 httpd-2.0/server/mpm/prefork/prefork.c Index: prefork.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v retrieving revision 1.258 retrieving revision 1.259 diff -u -r1.258 -r1.259 --- prefork.c 3 Apr 2002 13:38:06 -0000 1.258 +++ prefork.c 3 Apr 2002 13:45:57 -0000 1.259 @@ -1194,24 +1194,26 @@ static int prefork_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp) { static int restart_num = 0; - int no_detach, debug; + int no_detach, debug, foreground; apr_status_t rv; debug = ap_exists_config_define("DEBUG"); - if (debug) - no_detach = one_process = 1; + if (debug) { + foreground = one_process = 1; + } else { no_detach = ap_exists_config_define("NO_DETACH"); one_process = ap_exists_config_define("ONE_PROCESS"); + foreground = ap_exists_config_define("FOREGROUND"); } /* sigh, want this only the second time around */ if (restart_num++ == 1) { is_graceful = 0; - if (!one_process) { + if (!one_process && !foreground) { rv = apr_proc_detach(no_detach ? APR_PROC_DETACH_FOREGROUND : APR_PROC_DETACH_DAEMONIZE); if (rv != APR_SUCCESS) {