Thee context of this question is I have started implementing a TCP server using coroutines. I have a supervisorScope wrapping the main receive loop that launches child jobs for each connection. I would like to handle using a Runtime shutdown hook (or some other way of handling SIGINT) such that each client connection is closed and any pending work is finished (such as draining buffers on to downstream services). I’ve tried cancelling the supervisor scope on shutdown, but it doesn’t run the code following it to close things down, even if wrapped in NonCancellable