Propagate CHLD and USR1 signal to the Process Manager

https://github.com/php-pm/php-pm-docker/pull/11
This commit is contained in:
TBK 2020-04-23 10:39:18 +02:00
parent afa2849574
commit b3168c5a46
No known key found for this signature in database
GPG Key ID: 6D4FD19CB66C95EA
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ echo "Getting PPM ready:"
trapIt() { trapIt() {
"$@" & "$@" &
pid="$!" pid="$!"
trap 'kill -INT $pid' INT TERM for SGNL in INT TERM CHLD USR1; do
trap "kill -$SGNL $pid" "$SGNL";
done
while kill -0 $pid >/dev/null 2>&1; do while kill -0 $pid >/dev/null 2>&1; do
wait $pid wait $pid
ec="$?" ec="$?"