Extend ordered test
[dbsrgits/DBIx-Class.git] / Makefile.PL
index f590d45..f9551f8 100644 (file)
@@ -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.
 
@@ -119,9 +120,21 @@ EOW
       exit 0;
   }
   else {
-      wait();
+      eval {
+          local $SIG{ALRM} = sub { die "timeout\n" };
+          alarm 5;
+          wait();
+          alarm 0;
+      };
+      my $exception = $@;
+
       my $sig = $? & 127;
-      if ($sig == 11) {
+
+# make sure process actually dies
+      $exception && kill POSIX::SIGKILL(), $pid;
+
+      if ($exception || $sig == POSIX::SIGSEGV() || $sig == POSIX::SIGABRT()
+        || $sig == 7) { # 7 == SIGBUS, haven't seen it but just in case
           warn (<<EOE);
 
 ############################### WARNING #################################