mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-08 06:38:12 -04:00
avoid resource collisions (segfaulted under cygwin)
This commit is contained in:
parent
389337381d
commit
3ab8e9d709
1 changed files with 6 additions and 0 deletions
|
@ -79,6 +79,12 @@ foreach my $call_func (@CALL_FUNCS) {
|
||||||
skip("No fork here", 1);
|
skip("No fork here", 1);
|
||||||
} elsif (!$pid) {
|
} elsif (!$pid) {
|
||||||
# child
|
# 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", '', '',
|
my $dbh2 = DBI->connect("dbi:SQLite:$dbfile", '', '',
|
||||||
{
|
{
|
||||||
RaiseError => 1,
|
RaiseError => 1,
|
||||||
|
|
Loading…
Add table
Reference in a new issue