diff --git a/sky/skylet/log_lib.py b/sky/skylet/log_lib.py index deeed4429e9..ba04fea5d49 100644 --- a/sky/skylet/log_lib.py +++ b/sky/skylet/log_lib.py @@ -259,6 +259,9 @@ def run_with_log( return proc.returncode, stdout, stderr return proc.returncode except KeyboardInterrupt: + # Send SIGINT to the process directly, otherwise, the underlying process + # will only killed after the python program exits, causing the stream + # handling stuck at `readline`. os.killpg(proc.pid, signal.SIGINT) raise