255bea59389b5f9eef06737e723ee68e81526bcd
[mkws-moved-to-github.git] / test / bin / bomb
1 #!/bin/sh
2 # Copyright (c) 2014 Index Data ApS. http://indexdata.com
3 #
4 # bomb - wrapper to stop a process after N seconds
5
6 # Turn on job control. This will switch to process group
7 # as on an interactive shell, and make sure that a signal
8 # to the process group will not kill any parent processes
9 set -o monitor
10
11 # now run the perl script. For unknown reasons, the
12 # call to setpgrp() in perl does not work as expected,
13 # and we solve the issue by this simple shell wrapper
14
15 exec $0.pl "$@"
16
17 # EOF