Author: timbo
Date: Mon Jul 26 13:22:03 2010
New Revision: 14287
Modified:
dbi/trunk/t/16destroy.t
Log:
Added plausible handling of fork failure (eg on non-supported systems). Not
well tested.
Modified: dbi/trunk/t/16destroy.t
==============================================================================
--- dbi/trunk/t/16destroy.t (original)
+++ dbi/trunk/t/16destroy.t Mon Jul 26 13:22:03 2010
@@ -120,9 +120,14 @@
ok $dbh->{AutoInactiveDestroy}, 'InactiveDestroy should be set';
ok $dbh->{Active}, 'Should start active';
- # XXX Add code to skip where fork() is unimplemented.
- my $pid = fork();
- if ($pid) {
+ my $pid = eval { fork() };
+ if (not defined $pid) {
+ chomp $@;
+ my $msg = "AutoInactiveDestroy destroy test skipped";
+ diag "$msg because $...@\n";
+ pass $msg; # in lieu of the child status test
+ }
+ elsif ($pid) {
# parent.
$expect_active = 1;
wait;