Hacker News new | ask | show | jobs
by throwaway892238 1502 days 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
1 comments

That looks a million times better than the horrible hack I wrote. Do you want credit for it when I fix the doc?
Only if it's credited to either "IPBH" or "Some Bash-loving troll on Hacker News" (ninja edit, sry)
Done!