[Bast-commits] r5543 - DBIx-Class/0.08/trunk

caelum at dev.catalyst.perl.org caelum at dev.catalyst.perl.org
Fri Feb 20 03:57:19 GMT 2009


Author: caelum
Date: 2009-02-20 03:57:18 +0000 (Fri, 20 Feb 2009)
New Revision: 5543

Modified:
   DBIx-Class/0.08/trunk/Makefile.PL
Log:
added timeout to sqlite health check because some buggy versions of sqlite just hang

Modified: DBIx-Class/0.08/trunk/Makefile.PL
===================================================================
--- DBIx-Class/0.08/trunk/Makefile.PL	2009-02-20 03:32:00 UTC (rev 5542)
+++ DBIx-Class/0.08/trunk/Makefile.PL	2009-02-20 03:57:18 UTC (rev 5543)
@@ -1,6 +1,7 @@
 use inc::Module::Install 0.67;
 use strict;
 use warnings;
+use POSIX ();
 
 use 5.006001; # delete this line if you want to send patches for earlier.
 
@@ -118,9 +119,14 @@
       exit 0;
   }
   else {
-      wait();
+      eval {
+          local $SIG{ALRM} = sub { die "timeout\n" };
+          alarm 5;
+          wait();
+          alarm 0;
+      };
       my $sig = $? & 127;
-      if ($sig == 11) {
+      if ($@ || $sig == POSIX::SIGSEGV) {
           warn (<<EOE);
 
 ############################### WARNING #################################




More information about the Bast-commits mailing list