nelson64 has asked for the wisdom of the Perl Monks concerning the following question:
But by monitoring through htop I am seeing multiple runs of the solver at one time, when there should only be one. Also, looking at the output the ordering is incorrect. Thanks! Nicolemy $pid; local $SIG{ALRM} = sub { kill 9, $pid; die "Timeout\n"; }; $pid = fork; eval { alarm $timeout; $result = `$solver $file`; waitpid($pid, 0); }; alarm 0;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Timeout and kill
by Eliya (Vicar) on Mar 20, 2012 at 18:55 UTC | |
Re: Timeout and kill
by onelesd (Pilgrim) on Mar 20, 2012 at 18:12 UTC | |
by nelson64 (Initiate) on Mar 20, 2012 at 18:22 UTC | |
by onelesd (Pilgrim) on Mar 20, 2012 at 18:40 UTC | |
by onelesd (Pilgrim) on Mar 20, 2012 at 19:00 UTC | |
by Eliya (Vicar) on Mar 21, 2012 at 02:33 UTC | |
| |
by nelson64 (Initiate) on Mar 20, 2012 at 20:00 UTC | |
by Anonymous Monk on Mar 20, 2012 at 18:43 UTC | |
Re: Timeout and kill
by Anonymous Monk on Mar 20, 2012 at 18:49 UTC |