#!/usr/bin/env -S bash -i

# the above flags let this script use functions (eg termname) from the .bashrc
set -eu
set -o pipefail

main() {
  trap 'true' INT TERM

  exec service-a &
  exec service-b &

  wait -n || true
  kill -s SIGINT -1
  wait
}

main "$@"
