Skip to content

Commit c392583

Browse files
authored
Be explicit about filesystem monitoring radio being ForkProcess (#3680)
Prior to this PR, on Linux, this is already a fork process because of defaults. But this process *must* be a fork process, for the same reason that other explicit ForkProcesses in Parsl must be fork processes: we cannot re-import the the unknown user workflow script again. This PR makes that explicit and consistent with other forked processes. Longer term, multiprocessing-forked processes need to go away throughout Parsl - see issue #2343, but this PR is not for that. # Changed Behaviour This should not change behaviour on Linux. On platforms that are not Linux, nothing is supported and is probably already broken here. ## Type of change - Code maintenance/cleanup
1 parent 6852e8e commit c392583

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

parsl/monitoring/monitoring.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import pickle
77
import queue
88
import time
9-
from multiprocessing import Event, Process
9+
from multiprocessing import Event
1010
from multiprocessing.queues import Queue
1111
from typing import TYPE_CHECKING, Literal, Optional, Tuple, Union, cast
1212

@@ -171,11 +171,11 @@ def start(self, dfk_run_dir: str, config_run_dir: Union[str, os.PathLike]) -> No
171171
self.dbm_proc.start()
172172
logger.info("Started the router process %s and DBM process %s", self.router_proc.pid, self.dbm_proc.pid)
173173

174-
self.filesystem_proc = Process(target=filesystem_receiver,
175-
args=(self.logdir, self.resource_msgs, dfk_run_dir),
176-
name="Monitoring-Filesystem-Process",
177-
daemon=True
178-
)
174+
self.filesystem_proc = ForkProcess(target=filesystem_receiver,
175+
args=(self.logdir, self.resource_msgs, dfk_run_dir),
176+
name="Monitoring-Filesystem-Process",
177+
daemon=True
178+
)
179179
self.filesystem_proc.start()
180180
logger.info("Started filesystem radio receiver process %s", self.filesystem_proc.pid)
181181

0 commit comments

Comments
 (0)