3 ms·
It's interesting that their bash init uses fg %1. That may return only on the first process changing state, rather than either process exiting. It should probab
by throwaway892238 4y ago
It's interesting that their bash init uses fg %1. That may return only on the first process changing state, rather than either process exiting. It should probably use this instead:
#!/usr/bin/env bash
/app/server &
/app/server -bar &
wait -f -n -p app ; rc=$?
printf "%s: Application '%s' exited: status '%i'\n" "$0" "$app" "$rc"
exit $rc
- tptacek 4y agoThat looks a million times better than the horrible hack I wrote. Do you want credit for it when I fix the doc?
- throwaway892238 4y agoOnly if it's credited to either "IPBH" or "Some Bash-loving troll on Hacker News" (ninja edit, sry)
- tptacek 4y agoDone!