I need to write a bash script that starts a blocking process, then detaches from it so I can run some other commands that configure this running process, then reattach to the original process such that ctrl+c will kill it.
Specifically, this happens to be the Google Cloud PubSub emulator, so the bash script looks something like the following pseudocode:
# TODO: pubsub will block, but I need to detach from it so I can create topics.
gcloud beta emulators pubsub start --host-port=localhost:8086
python publisher.py myapp create topic1
python publisher.py myapp create topic2
# TODO: Now I need to reattach to the pubsub process.