in reply to Re: Eval/Fork lesson of the day
in thread Eval/Fork lesson of the day
The basic premise was that I needed to catch all errors from a series of steps, and if there were any errors in the middle, I needed to do whatever to undo the changes:
while(1) { eval { do_this(); do_that(); fork_and_stuff(); and_why_not_do_this_as_well(); }; if( $@ ) { undo_changes(); log( "there was, like, something wrong: $@" ); } }
It just so happened that one of the subs actually forked, and hence the problem. I wasn't trying to eval the fork() per se... ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Eval/Fork lesson of the day
by graff (Chancellor) on May 15, 2002 at 17:28 UTC |