On Linux, I would like to spawn off some servers as background services.

**As soon as one of them terminates with an exit code != 0**, they shall **all** to be SIGTERMed, and after 3 seconds grace period be KILLed if they don't want to go.

The same shall happen when Ctrl-C is pressed.

I want a rough equivalent of

```
set -e
server1 &
server2 &
server3 &
wait (+ kill on error)

```

(Unfortunately that code above does **not** have all the mentioned properties.)

It shall **not** be possible for children to steal/escape the Ctrl-C signals.

I accept solutions in **Bash** and **Python** (using `subprocess`). For Python they may only use standard library functions (nothing I have to download modules with `pip` first). If you have a cool way to do this in another language, please do not hesitate to show it.

Bonus points if it also works on Mac OS.