[Pdx-pm] forking

Michael Rasmussen mikeraz at patch.com
Wed Jan 24 15:36:08 PST 2007


Consider this code representation:

while( database_query ) {

  bunch of stuff

  if(my $pid = fork) {
     parent processing
  } else { # child stuff follows
     if( ! $test_target ) {
            print "WTF? No $test_target?\n";
            $ret = test_it($test_target);
            exit $ret;
     }
  }
}

At this point you may be chuckling, scratching your head, wiping beverages off the
monitor or ...

If you're scratching your head study the code until the light goes on.  It is not
recommended to implement a test case to see what happens.  This is especially not
recommended if you like your database or the responsiveness of your system.

-- 
   Michael Rasmussen, Portland, Ore, USA
  Be Appropriate && Follow Your Curiosity
        http://www.patch.com/words/



-- 
   Michael Rasmussen, Portland, Ore, USA
  Be Appropriate && Follow Your Curiosity
        http://www.patch.com/words/




More information about the Pdx-pm-list mailing list