On Mon, Aug 04, 2014 at 05:18:58PM -0400, Dave Horner wrote: > Hanging perl process during test of Farabi and others. > > running cpan from cmd.exe > - cpan shell -- CPAN exploration and modules installation (v2.05) > cpan> install Farabi > ... > t/00-compile.t ....... ok > t/01-basic.t ......... > ----------------------------------------- > > The process never returns. > > Anyways, when smoking and running scripts with perl on windows sometimes I > come to my unattended automated machine locked and blocking. No fun. > I kill the most childish process and it continues; failed.
I find that it happens seldom enough that I can just bounce on C-c. People who prefer a bit more automation would presumably have some kind of automatic time-out. Here's the bare bones of how to do that in the shell. I'm sure you can adapt it to however you're smoking: #!/bin/bash function long_running_process() { sleep 5 echo I didn\'t get killed } long_running_process& CHILDPID=$! sleep 2 kill $! $ time ./foo.sh real 0m2.008s ... Note the & when long_running_process is invoked, so it's forked off. The parent then times out and kills the child before it finishes. -- David Cantrell | top google result for "topless karaoke murders" comparative and superlative explained: <Huhn> worse, worser, worsest, worsted, wasted