only kill children, if we got signalled
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
a202826a62
commit
ee076ef7e9
1 changed files with 8 additions and 2 deletions
|
@ -348,15 +348,21 @@ __cdist_remote_type_explorer_dir()
|
|||
|
||||
|
||||
################################################################################
|
||||
# Temp clenup
|
||||
# Traps
|
||||
#
|
||||
__cdist_tmp_removal()
|
||||
{
|
||||
kill 0
|
||||
rm -rf "${__cdist_tmp_dir}"
|
||||
}
|
||||
|
||||
__cdist_exit_on_kill()
|
||||
{
|
||||
kill 0
|
||||
__cdist_tmp_removal
|
||||
}
|
||||
|
||||
trap __cdist_tmp_removal EXIT
|
||||
trap __cdist_exit_on_kill SIGINT SIGTERM
|
||||
|
||||
|
||||
################################################################################
|
||||
|
|
Loading…
Reference in a new issue