Skip to content

Commit

Permalink
Make local_driver use start_new_session when spawning children
Browse files Browse the repository at this point in the history
This makes it more in line with lsf driver.
preexec_fn can also deadlock when using fork method for multiprocessing
module.
  • Loading branch information
JHolba committed Dec 3, 2024
1 parent 691b3e8 commit 0ee3d49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ert/scheduler/local_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import asyncio
import contextlib
import logging
import os
import signal
from asyncio.subprocess import Process
from contextlib import suppress
Expand Down Expand Up @@ -106,7 +105,7 @@ async def _init(iens: int, executable: str, /, *args: str) -> Process:
return await asyncio.create_subprocess_exec(
executable,
*args,
preexec_fn=os.setpgrp,
start_new_session=True,
)

@staticmethod
Expand Down

0 comments on commit 0ee3d49

Please sign in to comment.