Skip to content

Commit

Permalink
If the killing all processes is a problem, then use kill 0. This was …
Browse files Browse the repository at this point in the history
…not the solution.
  • Loading branch information
philipbergen committed Sep 29, 2013
1 parent 790c1d6 commit 7026b9d
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,25 +68,7 @@ install_bins () {
cat > zero <<EOF
#!/bin/bash
. $here/env.sh
trap ctrl_c EXIT
function ctrl_c() {
set +eu
for pid in "\${pids[@]}"; do
kill -0 \$pid 2>/dev/null 1>/dev/null || {
continue
}
kill \$pid
done
}
pids=()
function add_pid() {
pids=( \$1 \${pids[@]} )
}
python -m \$(basename \$0) "\$@"&
add_pid \$!
wait
python -m \$(basename \$0) "\$@"
EOF
chmod a+x zero
for exe in zlog zlog-sink; do
Expand Down

0 comments on commit 7026b9d

Please sign in to comment.