www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Bottelier <c.bottel...@quicknet.nl>
Subject os-linux/7040: Commandline option dor running apache superviced
Date Sun, 07 Jan 2001 14:04:40 GMT

>Number:         7040
>Category:       os-linux
>Synopsis:       Commandline option dor running apache superviced
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Sun Jan 07 06:10:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     c.bottelier@quicknet.nl
>Release:        1.3.14
>Organization:
apache
>Environment:
unix / linux, kernel independed, svscan / init
>Description:
Patch to option parser and main process detach points to add -F option. When the -F option
is given, the main proccess does not detach itself. This way it is possible to run apache
directly for inittab or supervices through svscan.
>How-To-Repeat:

>Fix:
--- http_main.c.old	Thu Sep 28 15:32:36 2000
+++ http_main.c		Sun Jan  7 15:35:38 2001
@@ -321,6 +321,13 @@
 
 static int one_process = 0;
 
+// Added the -F option to run the apache http daemon in the
+// foreground. This way apache can run directly under init or
+// superviced under the svscan facility.
+// Christian Bottelier <c.bottelier@quicknet.nl>
+
+static int foregroundmode = 0;
+
 /* set if timeouts are to be handled by the children and not by the parent.
  * i.e. child_timeouts = !standalone || one_process.
  */
@@ -4615,7 +4622,11 @@
     is_graceful = 0;
 
     if (!one_process) {
-	detach();
+	// Added the -F option to run the apache http daemon in the
+	// foreground. This way apache can run directly under init or
+	// superviced under the svscan facility.
+	// Christian Bottelier <c.bottelier@quicknet.nl>
+	if (!foregroundmode) detach();
     }
     else {
 	MONCONTROL(1);
@@ -4939,6 +4950,13 @@
 	case 'X':
 	    ++one_process;	/* Weird debugging mode. */
 	    break;
+	// Added the -F option to run the apache http daemon in the
+	// foreground. This way apache can run directly under init or
+	// superviced under the svscan facility.
+	// Christian Bottelier <c.bottelier@quicknet.nl>
+	case 'F':
+	    ++foregroundmode;
+	    break;
 #ifdef TPF
 	case 'x':
 	    os_tpf_child(&input_parms.child);
@@ -5879,7 +5897,11 @@
 	max_jobs_after_exit_request = max_jobs_per_exe / 10;
 
     if (!one_process)
-	detach();
+	// Added the -F option to run the apache http daemon in the
+	// foreground. This way apache can run directly under init or
+	// superviced under the svscan facility.
+	// Christian Bottelier <c.bottelier@quicknet.nl>
+	if (!foregroundmode) detach();
 
     my_pid = getpid();
 
@@ -6810,6 +6832,13 @@
 
 	case 'X':
 	    ++one_process;	/* Weird debugging mode. */
+	    break;
+	// Added the -F option to run the apache http daemon in the
+	// foreground. This way apache can run directly under init or
+	// superviced under the svscan facility.
+	// Christian Bottelier <c.bottelier@quicknet.nl>
+	case 'F':
+	    ++foregroundmode;
 	    break;
 	case 't':
 	    ap_configtestonly = 1;

>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]
 
 


Mime
View raw message