mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00: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:
parent
c7e71bbbe2
commit
e80c1e1df7
1 changed files with 3 additions and 0 deletions
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]+$'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue