You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by David Whitmarsh <da...@dial.pipex.com> on 1999/09/17 14:41:37 UTC

os-windows/5028: Use of -c or -C options prevents apache from running

>Number:         5028
>Category:       os-windows
>Synopsis:       Use of -c or -C options prevents apache from running
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Fri Sep 17 05:50:00 PDT 1999
>Last-Modified:
>Originator:     david.whitmarsh@dial.pipex.com
>Organization:
apache
>Release:        1.3.9
>Environment:
Windows 95 OSR2
>Description:
When setting a command line paramter containing a space, such as

apache -d /work/apache -c "ProxyRequests On"

The function create_process when starting a child process loses the quotes so 
that ProxyRequests and On become separate paramaters, leading to a failure to 
start the child. The parent loops indefinitely restarting the child.


>How-To-Repeat:

>Fix:
Changing line 5819 of http_main.c (in create_process) to quote all parameters
fixes the problem for me on windows 95. I will post a patch to new-httpd later.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@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!     ]




Re: os-windows/5028: Use of -c or -C options prevents apache from running

Posted by David Whitmarsh <da...@dial.pipex.com>.
On 17 Sep 1999 12:50:00 -0000, you wrote:

Here's the patch. Ignore the version numbers, they're from my own CVS
repository - this is against the 1.3.9 distribution


Index: apache/src/main/http_main.c
diff -c apache/src/main/http_main.c:1.1.1.3 apache/src/main/http_main.c:1.1.1.3.2.3
*** apache/src/main/http_main.c:1.1.1.3	Tue Sep 14 16:49:18 1999
--- apache/src/main/http_main.c	Fri Sep 17 17:15:02 1999
***************
*** 5815,5821 ****
      pCommand = ap_psprintf(p, "\"%s\" -Z %s -f \"%s\"", buf, exit_event_name, ap_server_confname);  
  
      for (i = 1; i < argc; i++) {
!         pCommand = ap_pstrcat(p, pCommand, " ", argv[i], NULL);
      }
  
      /* Create a pipe to send socket info to the child */
--- 5815,5821 ----
      pCommand = ap_psprintf(p, "\"%s\" -Z %s -f \"%s\"", buf, exit_event_name, ap_server_confname);  
  
      for (i = 1; i < argc; i++) {
!         pCommand = ap_pstrcat(p, pCommand, " \"", argv[i], "\"", NULL);
      }
  
      /* Create a pipe to send socket info to the child */

************************************

David Whitmarsh

Sparkle Computer Co Ltd

Sybase C C++ perl UNIX NT

************************************