From 363dfc57b9b6d5b1046acb60afc1d50ed5ff6694 Mon Sep 17 00:00:00 2001 From: Kiuk Chung Date: Tue, 6 May 2025 10:44:37 -0700 Subject: [PATCH] (torchx/local_scheduler) go back to using os.killpg in local_scheduler (#1064) Summary: Reverting the os.killpg -> os.kill part of https://github.com/pytorch/torchx/pull/1062. Reviewed By: d4l3k Differential Revision: D74205288 --- torchx/schedulers/local_scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchx/schedulers/local_scheduler.py b/torchx/schedulers/local_scheduler.py index aa5f63bf5..9250ee72a 100644 --- a/torchx/schedulers/local_scheduler.py +++ b/torchx/schedulers/local_scheduler.py @@ -311,7 +311,7 @@ def terminate(self) -> None: """ # safe to call terminate on a process that already died try: - os.kill(self.proc.pid, signal.SIGTERM) + os.killpg(self.proc.pid, signal.SIGTERM) except ProcessLookupError as e: log.debug(f"Process {self.proc.pid} already got terminated")