blob: e18b6ad594734265fe129c2a90d4d78c399049cb [file] [log] [blame]
Klement Sekeradb4e84c2017-08-11 10:06:15 +02001#!/bin/bash
2
3if [[ "$1" == "1" ]]
4then
5 setsid scripts/run_in_venv_with_cleanup.sh $*
6 pid=$!
7else
8 setsid scripts/run_in_venv_with_cleanup.sh $* &
9 pid=$!
10 trap "echo setsid_wrapper.sh: got signal, killing child pid ${pid}; kill ${pid}; sleep .1;" SIGINT SIGTERM
11 wait
12fi