Changes with Apache 2.0.26-dev
+ *) Add -X functionality back. This indicates to all MPMs and any other
+ part of Apache that it should run in "debug" mode. [Justin Erenkrantz]
+
*) Some initial support for the cygwin platform [prefork only].
This is not to be confused with support for the WinNT/Win32
platform, which is the recommended configuration for native
which was used for printing the virtual host configuration has
been replaced by <code>-t -D DUMP_VHOSTS</code>.</li>
-<li>The <code>httpd</code> command line option <code>-X</code> has
-been removed. Most MPMs allow the same functionality to be requested
-by using the <code>-D ONE_PROCESS</code> command line
-option. In addition, a <code>-D NO_DETACH</code> command line
-option is available.</li>
-
<li>The module mod_auth_digest, which was experimental in Apache 1.3
is now a standard module.</li>
qui servait à afficher la configuration des hôtes virtuels est
remplacé par <code>-t -D DUMP_VHOSTS</code>.</li>
-<li>L'option <code>-X</code> du programme <code>httpd</code>
-est supprime. La majorité des MPM permettent la même fonctionnalité
-en définissant les variables d'environnement <code>ONE_PROCESS</code> et
-<code>NO_DETACH</code> avant de lancer <code>httpd</code>.</li>
-
<li>Le module mod_auth_digest, qui était expérimental dans la version 1.3,
est maintenant un module standard.</li>
* in apr_getopt() format. Use this for default'ing args that the MPM
* can safely ignore and pass on from its rewrite_args() handler.
*/
-#define AP_SERVER_BASEARGS "C:c:D:d:f:vVlLth?"
+#define AP_SERVER_BASEARGS "C:c:D:d:f:vVlLth?X"
#ifdef __cplusplus
extern "C" {
new = (char **)apr_array_push(ap_server_config_defines);
*new = apr_pstrdup(pcommands, optarg);
break;
+ case 'X':
+ new = (char **)apr_array_push(ap_server_config_defines);
+ *new = "DEBUG";
+ break;
case 'f':
confname = optarg;
break;
static void beos_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach = 0;
+ int no_detach, debug;
- one_process = !!ap_exists_config_define("ONE_PROCESS");
- no_detach = !!ap_exists_config_define("NO_DETACH");
+ debug = ap_exists_config_define("DEBUG");
+
+ if (debug)
+ no_detach = one_process = 1;
+ else
+ {
+ one_process = ap_exists_config_define("ONE_PROCESS");
+ no_detach = ap_exists_config_define("NO_DETACH");
+ }
/* sigh, want this only the second time around */
if (restart_num++ == 1) {
server_rec *ap_server_conf;
-/* The perchild MPM respects a couple of runtime flags that can aid
- * in debugging. Setting the -DNO_DETACH flag will prevent the root process
- * from detaching from its controlling terminal. Additionally, setting
- * the -DONE_PROCESS flag (which implies -DNO_DETACH) will get you the
- * child_main loop running in the process which originally started up.
- * This gives you a pretty nice debugging environment. (You'll get a SIGHUP
+/* one_process --- debugging mode variable; can be set from the command line
+ * with the -X flag. If set, this gets you the child_main loop running
+ * in the process which originally started up (no detach, no make_child),
+ * which is a pretty nice debugging environment. (You'll get a SIGHUP
* early in standalone_main; just continue through. This is the server
* trying to kill off any child processes which it might have lying
* around --- Apache doesn't keep track of their pids, it just sends
static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach = 0;
+ int no_detach, debug;
int i;
- one_process = !!ap_exists_config_define("ONE_PROCESS");
- no_detach = !!ap_exists_config_define("NO_DETACH");
+ debug = ap_exists_config_define("DEBUG");
+
+ if (debug)
+ no_detach = one_process = 1;
+ else
+ {
+ one_process = ap_exists_config_define("ONE_PROCESS");
+ no_detach = ap_exists_config_define("NO_DETACH");
+ }
/* sigh, want this only the second time around */
if (restart_num++ == 1) {
static void mpmt_os2_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
- one_process = !!ap_exists_config_define("ONE_PROCESS");
+ one_process = ap_exists_config_define("ONE_PROCESS") ||
+ ap_exists_config_define("DEBUG");
is_graceful = 0;
ap_listen_pre_config();
ap_daemons_to_start = DEFAULT_START_DAEMON;
server_rec *ap_server_conf;
-/* The perchild MPM respects a couple of runtime flags that can aid
- * in debugging. Setting the -DNO_DETACH flag will prevent the root process
- * from detaching from its controlling terminal. Additionally, setting
- * the -DONE_PROCESS flag (which implies -DNO_DETACH) will get you the
- * child_main loop running in the process which originally started up.
- * This gives you a pretty nice debugging environment. (You'll get a SIGHUP
+/* one_process --- debugging mode variable; can be set from the command line
+ * with the -X flag. If set, this gets you the child_main loop running
+ * in the process which originally started up (no detach, no make_child),
+ * which is a pretty nice debugging environment. (You'll get a SIGHUP
* early in standalone_main; just continue through. This is the server
* trying to kill off any child processes which it might have lying
* around --- Apache doesn't keep track of their pids, it just sends
static void perchild_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach = 0;
+ int no_detach, debug;
int i;
- one_process = !!ap_exists_config_define("ONE_PROCESS");
- no_detach = !!ap_exists_config_define("NO_DETACH");
+ debug = ap_exists_config_define("DEBUG");
+
+ if (debug)
+ no_detach = one_process = 1;
+ else
+ {
+ one_process = ap_exists_config_define("ONE_PROCESS");
+ no_detach = ap_exists_config_define("NO_DETACH");
+ }
/* sigh, want this only the second time around */
if (restart_num++ == 1) {
static fd_set listenfds;
static int listenmaxfd;
-/* The prefork MPM respects a couple of runtime flags that can aid
- * in debugging. Setting the -DNO_DETACH flag will prevent the root process
- * from detaching from its controlling terminal. Additionally, setting
- * the -DONE_PROCESS flag (which implies -DNO_DETACH) will get you the
- * child_main loop running in the process which originally started up.
- * This gives you a pretty nice debugging environment. (You'll get a SIGHUP
+/* one_process --- debugging mode variable; can be set from the command line
+ * with the -X flag. If set, this gets you the child_main loop running
+ * in the process which originally started up (no detach, no make_child),
+ * which is a pretty nice debugging environment. (You'll get a SIGHUP
* early in standalone_main; just continue through. This is the server
* trying to kill off any child processes which it might have lying
* around --- Apache doesn't keep track of their pids, it just sends
static void prefork_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach = 0;
+ int no_detach, debug;
- no_detach = !!ap_exists_config_define("NO_DETACH");
- one_process = !!ap_exists_config_define("ONE_PROCESS");
+ debug = ap_exists_config_define("DEBUG");
+
+ if (debug)
+ no_detach = one_process = 1;
+ else
+ {
+ no_detach = ap_exists_config_define("NO_DETACH");
+ one_process = ap_exists_config_define("ONE_PROCESS");
+ }
/* sigh, want this only the second time around */
if (restart_num++ == 1) {
server_rec *ap_server_conf;
-/* The spmt_os2 MPM respects a runtime flag that can aid
- * in debugging. Setting the -DONE_PROCESS flag will get you the
- * child_main loop running in the process which originally started up.
- * This gives you a pretty nice debugging environment. (You'll get a SIGHUP
+/* one_process --- debugging mode variable; can be set from the command line
+ * with the -X flag. If set, this gets you the child_main loop running
+ * in the process which originally started up (no detach, no make_child),
+ * which is a pretty nice debugging environment. (You'll get a SIGHUP
* early in standalone_main; just continue through. This is the server
* trying to kill off any child processes which it might have lying
* around --- Apache doesn't keep track of their pids, it just sends
static void spmt_os2_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
- one_process = !!ap_exists_config_define("ONE_PROCESS");
+ one_process = ap_exists_config_define("ONE_PROCESS") ||
+ ap_exists_config_define("DEBUG");
is_graceful = 0;
ap_listen_pre_config();
server_rec *ap_server_conf;
-
-/* The threaded MPM respects a couple of runtime flags that can aid
- * in debugging. Setting the -DNO_DETACH flag will prevent the root process
- * from detaching from its controlling terminal. Additionally, setting
- * the -DONE_PROCESS flag (which implies -DNO_DETACH) will get you the
- * child_main loop running in the process which originally started up.
- * This gives you a pretty nice debugging environment. (You'll get a SIGHUP
+/* one_process --- debugging mode variable; can be set from the command line
+ * with the -X flag. If set, this gets you the child_main loop running
+ * in the process which originally started up (no detach, no make_child),
+ * which is a pretty nice debugging environment. (You'll get a SIGHUP
* early in standalone_main; just continue through. This is the server
* trying to kill off any child processes which it might have lying
* around --- Apache doesn't keep track of their pids, it just sends
static void threaded_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach = 0;
+ int no_detach, debug;
+
+ debug = ap_exists_config_define("DEBUG");
- one_process = !!ap_exists_config_define("ONE_PROCESS");
- no_detach = !!ap_exists_config_define("NO_DETACH");
+ if (debug)
+ no_detach = one_process = 1;
+ else
+ {
+ no_detach = ap_exists_config_define("NO_DETACH");
+ one_process = ap_exists_config_define("ONE_PROCESS");
+ }
/* sigh, want this only the second time around */
if (restart_num++ == 1) {
*/
apr_status_t rv;
- if (ap_exists_config_define("ONE_PROCESS"))
+ if (ap_exists_config_define("ONE_PROCESS") ||
+ ap_exists_config_define("DEBUG"))
one_process = -1;
if (!strcasecmp(signal_arg, "runservice")
static void worker_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp)
{
static int restart_num = 0;
- int no_detach = 0;
+ int no_detach, debug;
- one_process = !!ap_exists_config_define("ONE_PROCESS");
- no_detach = !!ap_exists_config_define("NO_DETACH");
+ debug = ap_exists_config_define("DEBUG");
+
+ if (debug)
+ no_detach = one_process = 1;
+ else
+ {
+ one_process = ap_exists_config_define("ONE_PROCESS");
+ no_detach = ap_exists_config_define("NO_DETACH");
+ }
/* sigh, want this only the second time around */
if (restart_num++ == 1) {