Re: checking for infinite loops

2007-01-28 Thread Sisyphus
- Original Message - From: Chris Rodriguez . . for($number = 1; $number < 5; $number +=1) { $ProgramName = "infinite" . $number . ".pl"; eval { local $SIG{ALRM} = sub { die "$ProgramName timed out\n" }; alarm 9; require $ProgramName or die "Require failed\n"; ala

Re: checking for infinite loops

2007-01-28 Thread Foo JH
I wonder if it's possible to kill a thread in the Win32 implementation of Perl? Chris Wagner wrote: > I would start by executing the sub program in a seperate thread. That way > the main thread can keep an eye on it and decide if it's run too long and > then do something about it. Another way t

Re: checking for infinite loops

2007-01-28 Thread Bill Luebkert
Chris Rodriguez wrote: > > If the alarm function now works on Windows, why doesn't this code give > me the results I expect? Might it matter than I'm using Windows ME? > What about my version of PERL? It's the one from the CD that came with > that book. 5.6 I think - I can check if it matte

Re: checking for infinite loops

2007-01-28 Thread Chris Rodriguez
Thanks everyone for the responses. They're a little over my head though. I was referred to this list by someone on the PERL beginners list-serve, since my problem is Windows related. But from what I can tell, this list doesn't seem to be very beginner-oriented. :) And honestly, the cont