Bug 10074 - apachectl invokes httpd with -k option
Summary: apachectl invokes httpd with -k option
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: support (show other bugs)
Version: 2.0.39
Hardware: Sun Solaris
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-20 19:10 UTC by James Dugal
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
script demonstrating the problem, and httpd -V, -l report (2.46 KB, text/plain)
2002-06-21 03:59 UTC, James Dugal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Dugal 2002-06-20 19:10:41 UTC
For some reason I can't find a report on this ... so here goes!
apachectl is built to invoke httpd with the -k option to do a start, stop,
restart or graceful, eg, httpd -k start
But the -k option is not supported (in main.c).  I reverted to using the 1.3.x
version of apachectl as a bypass.
Comment 1 Jeff Trawick 2002-06-20 19:30:13 UTC
The code is not in main.c; it is called before the normal cmd-line processing in
main.c runs.

What is the symptom when you use apachectl from 2.0.39?  What is the output
of "apachectl -V"?
Comment 2 James Dugal 2002-06-21 03:59:51 UTC
Created attachment 2144 [details]
script demonstrating the problem, and httpd -V, -l report
Comment 3 Jeff Trawick 2002-06-21 10:19:31 UTC
Oh, the perchild MPM :)

If I can get it to build I'll make the minor change necessary to get it to
support -k.

Thanks for the extra doc!

Comment 4 Jeff Trawick 2002-06-21 11:02:19 UTC
This problem with the perchild MPM as been fixed in CVS and will be in the
next release.  In the meantime, you can use this patch:

Index: server/mpm/experimental/perchild/mpm.h
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/experimental/perchild/mpm.h,v
retrieving revision 1.16
diff -u -r1.16 mpm.h
--- server/mpm/experimental/perchild/mpm.h      1 Apr 2002 08:27:42 -0000       1.16
+++ server/mpm/experimental/perchild/mpm.h      21 Jun 2002 10:53:29 -0000
@@ -76,6 +76,7 @@
 #define AP_MPM_WANT_SET_MAX_REQUESTS
 #define AP_MPM_WANT_SET_COREDUMPDIR
 #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
+#define AP_MPM_WANT_SIGNAL_SERVER
 #define AP_MPM_USES_POD

 #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
Index: server/mpm/experimental/perchild/perchild.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/mpm/experimental/perchild/perchild.c,v
retrieving revision 1.126
diff -u -r1.126 perchild.c
--- server/mpm/experimental/perchild/perchild.c 13 Jun 2002 16:36:19 -0000     
1.126
+++ server/mpm/experimental/perchild/perchild.c 21 Jun 2002 10:53:30 -0000
@@ -1999,7 +1999,7 @@

 module AP_MODULE_DECLARE_DATA mpm_perchild_module = {
     MPM20_MODULE_STUFF,
-    NULL,                       /* hook to run before apache parses args */
+    ap_mpm_rewrite_args,        /* hook to run before apache parses args */
     NULL,                       /* create per-directory config structure */
     NULL,                       /* merge per-directory config structures */
     perchild_create_config,     /* create per-server config structure */

Apply the patch, then "make clean && make && make install".

Thanks for your report, and thanks for using Apache!