We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39a2cbd commit 3a9ac48Copy full SHA for 3a9ac48
nipype/pipeline/plugins/legacymultiproc.py
@@ -153,6 +153,12 @@ class NonDaemonPool(pool.Pool):
153
Process = NonDaemonProcess
154
155
156
+def process_initializer(cwd):
157
+ """Initializes the environment of the child process"""
158
+ os.chdir(cwd)
159
+ os.environ["NO_NIPYPE_ET"] = "1"
160
+
161
162
class LegacyMultiProcPlugin(DistributedPluginBase):
163
"""
164
Execute workflow with multiprocessing, not sending more jobs at once
@@ -223,7 +229,7 @@ def __init__(self, plugin_args=None):
223
229
self.pool = NipypePool(
224
230
processes=self.processors,
225
231
maxtasksperchild=maxtasks,
226
- initializer=os.chdir,
232
+ initializer=process_initializer,
227
233
initargs=(self._cwd,),
228
234
)
235
except TypeError:
0 commit comments