- or download this
my $parent_dbh = DBI->connect( ... );
if( my $pid = fork() ) {
...
# >>> because it *is* in the child's scope
exit 0;
}
- or download this
# fork first
if( my $pid = fork() ) {
...
}
my $parent_dbh = DBI->connect(...);
# do parent stuff
- or download this
my $parent_dbh = DBI->connect(...);
$parent_dbh->{ InactiveDestroy } = 0;
...
if(my $pid = fork()) {
# do stuff
}