Skip to content

Commit bc2bde5

Browse files
authored
Merge pull request #388 from ExaWorks/fix_local_exec_with_fork
Attach signal handler when starting reaper to avoid starting reaper on
2 parents c185606 + 2009a25 commit bc2bde5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/psij/executors/local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def _handle_sigchld(signum: int, frame: Optional[FrameType]) -> None:
2222
_ProcessReaper.get_instance()._handle_sigchld()
2323

2424

25-
signal.signal(signal.SIGCHLD, _handle_sigchld)
2625
_REAPER_SLEEP_TIME = 0.2
2726

2827

@@ -121,6 +120,7 @@ def get_instance(cls: Type['_ProcessReaper']) -> '_ProcessReaper':
121120
if cls._instance is None:
122121
cls._instance = _ProcessReaper()
123122
cls._instance.start()
123+
signal.signal(signal.SIGCHLD, _handle_sigchld)
124124
return cls._instance
125125

126126
def __init__(self) -> None:

0 commit comments

Comments
 (0)