Help for this page

Select Code to Download


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