##
# fork first
if( my $pid = fork() ) {
# do stuff, including opening new DBI connection
exit 0;
}
my $parent_dbh = DBI->connect(...);
# do parent stuff
####
my $parent_dbh = DBI->connect(...);
$parent_dbh->{ InactiveDestroy } = 0;
if(my $pid = fork()) {
# do stuff
}