dougm 02/01/06 11:29:19
Modified: perl-framework/Apache-Test/lib/Apache TestRun.pm
Log:
add is_parent() routine and use it in the END block when scanning for core
files
Revision Changes Path
1.83 +5 -3
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
Index: TestRun.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- TestRun.pm 6 Jan 2002 07:08:05 -0000 1.82
+++ TestRun.pm 6 Jan 2002 19:29:19 -0000 1.83
@@ -248,6 +248,9 @@
$opts->{'run-tests'} ||= @$tests;
}
+my $parent_pid = $$;
+sub is_parent { $$ == $parent_pid }
+
my $caught_sig_int = 0;
sub install_sighandlers {
@@ -276,9 +279,8 @@
#must eval "" to "install" this END block, otherwise it will
#always run, a subclass might not want that
- eval 'my $parent_pid = $$;
- END {
- return unless $$ == $parent_pid; # because of fork
+ eval 'END {
+ return unless is_parent(); # because of fork
local $?; # preserve the exit status
eval {
Apache::TestRun->new(test_config =>