dougm 02/04/06 18:14:40
Modified: perl-framework/Apache-Test/lib/Apache TestServer.pm
Log:
this $SIG{CHLD} / $? status checking stuff does not work well on
solaris or hpux. more often than not get:
waiting for server to start: 00:02
server has died with status 255 (please examine t/logs/error_log)
Terminated
and yet the server has started just fine, can run t/TEST -run and all
tests pass.
disabling this until somebody can make the code work properly on all
platforms.
Revision Changes Path
1.56 +16 -15
httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm
Index: TestServer.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- TestServer.pm 6 Apr 2002 07:12:26 -0000 1.55
+++ TestServer.pm 7 Apr 2002 02:14:40 -0000 1.56
@@ -417,26 +417,27 @@
}
else {
# XXX: try not to be POSIX dependent
- require POSIX;
+# require POSIX;
$old_sig = $SIG{CHLD};
- $SIG{CHLD} = sub {
- while ((my $child = waitpid(-1, POSIX::WNOHANG())) > 0) {
- my $status = $? >> 8;
- #error "got child exit $status";
- if ($status) {
- $self->failed_msg("\nserver has died with status
$status");
- kill SIGTERM => $$;
- }
- }
- };
+#XXX: this is not working well on solaris or hpux
+# $SIG{CHLD} = sub {
+# while ((my $child = waitpid(-1, POSIX::WNOHANG())) > 0) {
+# my $status = $? >> 8;
+# #error "got child exit $status";
+# if ($status) {
+# $self->failed_msg("\nserver has died with status
$status");
+# kill SIGTERM => $$;
+# }
+# }
+# };
defined(my $pid = fork) or die "Can't fork: $!";
unless ($pid) { # child
my $status = system "$cmd";
- if ($status) {
- $status = $? >> 8;
- #error "httpd didn't start! $status";
- }
+# if ($status) {
+# $status = $? >> 8;
+# #error "httpd didn't start! $status";
+# }
CORE::exit $status;
}
}