From 3ab8e9d709c50c08ba0ebad41957c25fc8e48376 Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Tue, 2 Nov 2010 21:03:14 +0000 Subject: [PATCH] avoid resource collisions (segfaulted under cygwin) --- t/08_busy.t | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/08_busy.t b/t/08_busy.t index 6968132..6e7748d 100644 --- a/t/08_busy.t +++ b/t/08_busy.t @@ -79,6 +79,12 @@ foreach my $call_func (@CALL_FUNCS) { skip("No fork here", 1); } elsif (!$pid) { # child + + # avoid resource collisions after fork + # http://www.slideshare.net/kazuho/un-5457977 + $dbh->{InactiveDestroy} = 1; + undef $dbh; + my $dbh2 = DBI->connect("dbi:SQLite:$dbfile", '', '', { RaiseError => 1,