Terminate processes on disconnection