Black holes may shut down stellar factories