From: Wolfram Schneider Date: Mon, 1 Dec 2014 12:53:18 +0000 (+0000) Subject: the regression check script bomb.pl needs to switch the process group, MKWS-340 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=f6c79975e0d027d1bec4e5c925ccce15460ae8ff;p=mkws-moved-to-github.git the regression check script bomb.pl needs to switch the process group, MKWS-340 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. --- diff --git a/test/bin/bomb b/test/bin/bomb new file mode 100755 index 0000000..255bea5 --- /dev/null +++ b/test/bin/bomb @@ -0,0 +1,17 @@ +#!/bin/sh +# 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 +# as on an interactive shell, and make sure that a signal +# to the process group will not kill any parent processes +set -o monitor + +# 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 "$@" + +# EOF