0be1dd5aa682fbb452a6597de0df55492ffc7680
[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 the 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