extract latest git commit ID from github, MKWS-420
[mkws-moved-to-github.git] / test / bin / bomb
index 255bea5..b706edf 100755 (executable)
@@ -1,17 +1,21 @@
-#!/bin/sh
+#!/bin/bash
 # Copyright (c) 2014 Index Data ApS. http://indexdata.com
 #
 # bomb - wrapper to stop a process after N seconds
 
-# Turn on job control. This will switch to process group
+# Turn on job control. This will switch the process group
 # as on an interactive shell, and make sure that a signal
-# to the process group will not kill any parent processes
+# to the process group will not kill any parent processes.
 set -o monitor
 
+# the maximum amount of cpu time in seconds
+# last resort if BSD::Resource is not available in ./bomb.pl
+ulimit -t 120
+
 # now run the perl script. For unknown reasons, the
 # call to setpgrp() in perl does not work as expected,
 # and we solve the issue by this simple shell wrapper
 
-exec $0.pl "$@"
+perl $0.pl "$@"
 
 # EOF