core: make sure any Subprocess exits no matter what