blob: 6d63426becc08f6141eb167d9985c734e9e02f64 [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 $*
Klement Sekeradb4e84c2017-08-11 10:06:15 +02006else
7 setsid scripts/run_in_venv_with_cleanup.sh $* &
8 pid=$!
9 trap "echo setsid_wrapper.sh: got signal, killing child pid ${pid}; kill ${pid}; sleep .1;" SIGINT SIGTERM
Klement Sekera8712ada2017-08-16 16:38:10 +020010 wait ${pid}
11 exit $?
Klement Sekeradb4e84c2017-08-11 10:06:15 +020012fi