X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F30.with_pid_file.t;h=d44cb1133f3b40aa0755841f45a8f937597a55ee;hb=1474b8d3db6aeb45b37592dc823c468a5b3f3c73;hp=fb9629b1318069373ae314f390351259f4f56db9;hpb=45b2dbae89e36c43903a81c0fb16555f06a41e9a;p=gitmo%2FMooseX-Daemonize.git diff --git a/t/30.with_pid_file.t b/t/30.with_pid_file.t index fb9629b..d44cb11 100644 --- a/t/30.with_pid_file.t +++ b/t/30.with_pid_file.t @@ -96,7 +96,15 @@ if (DEBUG) { } kill INT => $p->pid; diag "killed $pid" if DEBUG; -sleep(2); + +# give the process time to be killed on slow/loaded systems +for (1..10) { + last unless kill 0 => $pid; + # sleep a little before retrying + sleep(2); +} + + if (DEBUG) { diag `ps $pid`; diag "-------";