X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema.pm;h=d24acbdcea5561e4e04eb0046f6c0800b23e032a;hb=f3ec358e1859eb4ab179fda0d93e8c0336c0f8a9;hp=be36371673c1dca2bfe53567159b609922e72603;hpb=656524408f86cf27df8c70a900f452421be9c4e4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema.pm b/t/lib/DBICTest/Schema.pm index be36371..d24acbd 100644 --- a/t/lib/DBICTest/Schema.pm +++ b/t/lib/DBICTest/Schema.pm @@ -165,7 +165,12 @@ sub connection { # see if anyone was holding a lock before us, and wait up to 5 seconds for them to terminate # if we do not do this we may end up trampling over some long-running END or somesuch seek ($lock_fh, 0, SEEK_SET) or die "seek failed $!"; - if (read ($lock_fh, my $old_pid, 100) ) { + my $old_pid; + if ( + read ($lock_fh, $old_pid, 100) + and + ($old_pid) = $old_pid =~ /^(\d+)$/ + ) { for (1..50) { kill (0, $old_pid) or last; sleep 0.1;