mirror of
https://github.com/photoprism/photoprism.git
synced 2025-09-26 21:01:58 +08:00
Docker: Ensure that cmd.sh terminates its child processes when the parent script closes #5172
* Scripts: Ensure that child processes are terminated when parent script closes * Scripts: Exclude pgrep process id from kill
This commit is contained in:
3
scripts/dist/cmd.sh
vendored
3
scripts/dist/cmd.sh
vendored
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# clean up child processes via trap
|
||||
trap 'ps -p $$ -o pgid= | xargs pgrep -A -g | xargs kill ;exit' EXIT
|
||||
|
||||
# regular expressions
|
||||
re='^[0-9]+$'
|
||||
|
||||
|
Reference in New Issue
Block a user