This may sound trivial, but I\'m pretty sure this question hasn\'t been asked, or at least I can\'t find it.
I\'m looking for a way to construct an infinite wait
Here's a solution without a loop:
#!/usr/local/bin/dash echo $$ # -$$: kill process group (parent and children) #trap 'trap - TERM; kill 0' TERM #trap 'trap - INT TERM; kill 0' INT TERM trap 'trap - TERM; kill -s TERM -- -$$' TERM tail -f /dev/null & wait exit 0