trap background processes
This commit is contained in:
parent
07d8849432
commit
acc2344004
1 changed files with 2 additions and 0 deletions
2
gis
2
gis
|
|
@ -112,6 +112,7 @@ if [ "$fetch" == true ]; then
|
|||
# Fetch all Git repositories in background
|
||||
git fetch --prune --all 1> /dev/null 2> >(trap "" INT TERM; sed "s/^/${text_bold}${text_blue}${repository_name}${text_reset} /" >&2) &
|
||||
fetch_pids+=("$!")
|
||||
trap 'kill $!' INT
|
||||
done
|
||||
|
||||
for pid in "${fetch_pids[@]}"; do
|
||||
|
|
@ -149,6 +150,7 @@ if [ "$pull" == true ]; then
|
|||
|
||||
git pull 1> /dev/null 2> >(trap "" INT TERM; sed "s/^/${text_bold}${text_magenta}${repository_name}${text_reset} /" >&2) &
|
||||
pull_pids+=("$!")
|
||||
trap 'kill $!' INT
|
||||
done
|
||||
|
||||
for pid in "${pull_pids[@]}"; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue