Skip to content

Commit b41c2b3

Browse files
committed
Set process start_method to fork for MacOS
1 parent b42824d commit b41c2b3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mutmut/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import inspect
55
import itertools
66
import json
7-
from multiprocessing import Pool
7+
from multiprocessing import Pool, set_start_method
88
import os
99
import resource
1010
import shutil
@@ -882,6 +882,9 @@ def inner_timout_checker():
882882
@click.option('--max-children', type=int)
883883
@click.argument('mutant_names', required=False, nargs=-1)
884884
def run(mutant_names, *, max_children):
885+
# used to copy the global mutmut.config to subprocesses
886+
set_start_method('fork')
887+
885888
assert isinstance(mutant_names, (tuple, list)), mutant_names
886889
_run(mutant_names, max_children)
887890

0 commit comments

Comments
 (0)