Skip to content

Commit

Permalink
suppress error messages from subshell trap kills
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke committed Feb 4, 2015
1 parent 165b085 commit b83fc47
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions bin/heroku-hhvm-apache2
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ trap 'trap - INT; kill -INT $$; exit' INT
[[ $verbose ]] && echo "Starting log redirection..." >&2
(
trap 'echo "tail" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
touch "${logs[@]}"
tail -qF -n 0 "${logs[@]}" 1>&2 &
wait
Expand All @@ -321,7 +321,7 @@ trap 'trap - INT; kill -INT $$; exit' INT
echo "Starting hhvm..." >&2
(
trap 'echo "hhvm" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
hhvm --mode server "${php_configs[@]}" &
wait
) & pids+=($!)
Expand All @@ -332,7 +332,7 @@ sleep 2
echo "Starting httpd..." >&2
(
trap 'echo "httpd" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
httpd -D NO_DETACH -c "Include $httpd_config" &
wait
) & pids+=($!)
Expand Down
6 changes: 3 additions & 3 deletions bin/heroku-hhvm-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ trap 'trap - INT; kill -INT $$; exit' INT
[[ $verbose ]] && echo "Starting log redirection..." >&2
(
trap 'echo "tail" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
touch "${logs[@]}"
tail -qF -n 0 "${logs[@]}" 1>&2 &
wait
Expand All @@ -285,7 +285,7 @@ trap 'trap - INT; kill -INT $$; exit' INT
echo "Starting hhvm..." >&2
(
trap 'echo "hhvm" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
hhvm --mode server "${php_config[@]}" &
wait
) & pids+=($!)
Expand All @@ -296,7 +296,7 @@ sleep 2
echo "Starting nginx..." >&2
(
trap 'echo "nginx" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
nginx -g "daemon off; include $nginx_config;" &
wait
) & pids+=($!)
Expand Down
4 changes: 2 additions & 2 deletions bin/heroku-php-apache2
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ trap 'trap - INT; kill -INT $$; exit' INT
echo "Starting php-fpm..." >&2
(
trap 'echo "php-fpm" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
php-fpm --nodaemonize -y "$fpm_config" -c "$php_config" &
wait
) & pids+=($!)
Expand All @@ -363,7 +363,7 @@ sleep 2
echo "Starting httpd..." >&2
(
trap 'echo "httpd" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
httpd -D NO_DETACH -c "Include $httpd_config" &
wait
) & pids+=($!)
Expand Down
4 changes: 2 additions & 2 deletions bin/heroku-php-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ trap 'trap - INT; kill -INT $$; exit' INT
echo "Starting php-fpm..." >&2
(
trap 'echo "php-fpm" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
php-fpm --nodaemonize -y "$fpm_config" -c "$php_config" &
wait
) & pids+=($!)
Expand All @@ -363,7 +363,7 @@ sleep 2
echo "Starting nginx..." >&2
(
trap 'echo "nginx" >&3;' EXIT
trap 'kill -TERM $!' TERM
trap 'kill -TERM $! 2> /dev/null' TERM
nginx -g "daemon off; include $nginx_config;" &
wait
) & pids+=($!)
Expand Down

0 comments on commit b83fc47

Please sign in to comment.