[Pdx-pm] forking
Michael G Schwern
schwern at gmail.com
Wed Jan 24 23:38:49 PST 2007
Michael Rasmussen wrote:
> 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 ...
Or having no idea. I give, what's the gag?
> 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.
More information about the Pdx-pm-list
mailing list