www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Bottelier" <c.bottel...@quicknet.nl>
Subject Re: os-linux/7040: Commandline option dor running apache superviced
Date Sun, 07 Jan 2001 15:20:03 GMT
The following reply was made to PR os-linux/7040; it has been noted by GNATS.

From: "C. Bottelier" <c.bottelier@quicknet.nl>
To: submit@bugz.apache.org, apache-bugdb@apache.org
Cc:  
Subject: Re: os-linux/7040: Commandline option dor running apache
  superviced
Date: Sun, 07 Jan 2001 16:12:58 +0100

 Forget old patch use this one!
  8< -------------------------
 
 --- http_main-old.c	Sun Jan  7 16:52:01 2001
 +++ http_main.c	Sun Jan  7 17:11:44 2001
 @@ -321,6 +321,14 @@
  
  static int one_process = 0;
  
 +/* foregroundmode --- flag indicating apache must run in the foreground; this
 + * variable is set from the command line with the -F flag. If set apache will
 + * not detach the main process. This is extremely usefull when running apache
 + * superviced under svscan or directly from inittab.
 + */
 +
 +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.
   */
 @@ -1046,9 +1054,9 @@
  	pad[i] = ' ';
      pad[i] = '\0';
  #ifdef SHARED_CORE
 -    fprintf(stderr, "Usage: %s [-R directory] [-D name] [-d directory] [-f
 file]\n", bin);
 +    fprintf(stderr, "Usage: %s [-R directory] [-D name] [-d directory] [-f
 file] [-F]\n", bin);
  #else
 -    fprintf(stderr, "Usage: %s [-D name] [-d directory] [-f file]\n", bin);
 +    fprintf(stderr, "Usage: %s [-D name] [-d directory] [-f file] [-F]\n",
 bin);
  #endif
      fprintf(stderr, "       %s [-C \"directive\"] [-c \"directive\"]\n",
 pad);
      fprintf(stderr, "       %s [-v] [-V] [-h] [-l] [-L] [-S] [-t] [-T]\n",
 pad);
 @@ -1062,6 +1070,7 @@
      fprintf(stderr, "  -D name          : define a name for use in
 <IfDefine name> directives\n");
      fprintf(stderr, "  -d directory     : specify an alternate initial
 ServerRoot\n");
      fprintf(stderr, "  -f file          : specify an alternate
 ServerConfigFile\n");
 +    fprintf(stderr, "  -F               : do not detach apache main
 process\n");
      fprintf(stderr, "  -C \"directive\"   : process directive before
 reading config files\n");
      fprintf(stderr, "  -c \"directive\"   : process directive after
 reading config files\n");
      fprintf(stderr, "  -v               : show version number\n");
 @@ -4615,7 +4624,7 @@
      is_graceful = 0;
  
      if (!one_process) {
 -	detach();
 +	if (!foregroundmode) detach();
      }
      else {
  	MONCONTROL(1);
 @@ -4895,7 +4904,7 @@
      ap_setup_prelinked_modules();
  
      while ((c = getopt(argc, argv,
 -				    "D:C:c:xXd:f:vVlLR:StTh"
 +				    "D:C:c:xXFd:f:vVlLR:StTh"
  #ifdef DEBUG_SIGSTOP
  				    "Z:"
  #endif
 @@ -4939,6 +4948,9 @@
  	case 'X':
  	    ++one_process;	/* Weird debugging mode. */
  	    break;
 +	case 'F':
 +	    ++foregroundmode;
 +	    break;
  #ifdef TPF
  	case 'x':
  	    os_tpf_child(&input_parms.child);
 @@ -5879,7 +5891,7 @@
  	max_jobs_after_exit_request = max_jobs_per_exe / 10;
  
      if (!one_process)
 -	detach();
 +	if (!foregroundmode) detach();
  
      my_pid = getpid();
  
 @@ -6702,7 +6714,7 @@
      ap_cpystrn(ap_server_root, cwd, sizeof(ap_server_root));
  #endif
  
 -    while ((c = getopt(argc, argv, "D:C:c:Xd:f:vVlLZ:iusStThk:n:")) != -1) {
 +    while ((c = getopt(argc, argv, "D:C:c:XFd:f:vVlLZ:iusStThk:n:")) != -1) {
          char **new;
  	switch (c) {
  	case 'c':
 @@ -6811,6 +6823,9 @@
  	case 'X':
  	    ++one_process;	/* Weird debugging mode. */
  	    break;
 +	case 'F':
 +	    ++foregroundmode;
 +	    break;
  	case 't':
  	    ap_configtestonly = 1;
  	    ap_docrootcheck = 1;
 @@ -7112,11 +7127,12 @@
       * but only handle the -L option 
       */
      llp_dir = SHARED_CORE_DIR;
 -    while ((c = getopt(argc, argv, "D:C:c:Xd:f:vVlLR:SZ:tTh")) != -1) {
 +    while ((c = getopt(argc, argv, "D:C:c:XFd:f:vVlLR:SZ:tTh")) != -1) {
  	switch (c) {
  	case 'D':
  	case 'C':
  	case 'c':
 +	case 'F':
  	case 'X':
  	case 'd':
  	case 'f':
 
 

Mime
View raw message