Hi,

I've just tried out Apache-Test 1.08 (on Win32) and noticed that when I 
ran its test suite with Apache 1.3.29 I was left with an Apache.exe 
process running afterwards.

I think I've seen this happen before, but never got round to looking at 
it.  Having now looked closer at the command-line being used to kick off 
the server, it seems to be wrong:

    C:/apache/apache.exe -d C:/Temp/Apache-Test-1.08/t -f 
C:/Temp/Apache-Test-1.08/t/conf/httpd.conf -DAPACHE1 -X

The problem is that there is no space between the "-D" and the 
"APACHE1".  That probably causes the "-X" to be ignored, hence two 
Apache.exe processes get kicked off, and only one gets killed later.  
(The "-X", of course, was to avoid that situation.)

The attached patch corrects this error (which was repeated in various 
places!), and fixes my problem with an Apache.exe being left behind.

Both Apache1 and Apache2 require the space, btw, so the patch works fine 
for my Apache 2 setup as well.

Cheers,
- Steve


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are 
confidential and intended for the addressee(s) only.  If you have received this 
message in error or there are any problems, please notify the sender immediately.  The 
unauthorized use, disclosure, copying or alteration of this message is strictly 
forbidden.  Note that any views or opinions presented in this email are solely those 
of the author and do not necessarily represent those of Radan Computational Ltd.  The 
recipient(s) of this message should check it and any attached files for viruses: Radan 
Computational will accept no liability for any damage caused by any virus transmitted 
by this email.
--- lib/Apache/TestServer.pm.orig       2004-02-24 00:58:38.000000000 +0000
+++ lib/Apache/TestServer.pm    2004-02-26 10:13:15.560926200 +0000
@@ -77,7 +77,7 @@
 
 sub dversion {
     my $self = shift;
-    "-DAPACHE$self->{rev}";
+    "-D APACHE$self->{rev}";
 }
 
 sub config_defines {
@@ -87,11 +87,11 @@
 
     for my $item (qw(useithreads)) {
         next unless $Config{$item} and $Config{$item} eq 'define';
-        push @defines, "-DPERL_\U$item";
+        push @defines, "-D PERL_\U$item";
     }
 
     if (my $defines = $self->{config}->{vars}->{defines}) {
-        push @defines, map { "-D$_" } split " ", $defines;
+        push @defines, map { "-D $_" } split " ", $defines;
     }
 
     "@defines";
@@ -106,11 +106,11 @@
     "-d $vars->{serverroot} -f $vars->{t_conf_file} $dversion $defines";
 }
 
-my %one_process = (1 => '-X', 2 => '-DONE_PROCESS');
+my %one_process = (1 => '-X', 2 => '-D ONE_PROCESS');
 
 sub start_cmd {
     my $self = shift;
-    #XXX: threaded mpm does not respond to SIGTERM with -DONE_PROCESS
+    #XXX: threaded mpm does not respond to SIGTERM with -D ONE_PROCESS
     my $args = $self->args;
     return "$self->{config}->{vars}->{httpd} $args";
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to