Skip to content

Commit 4d4fa40

Browse files
committed
Set process start_method to fork for MacOS
1 parent 51fd290 commit 4d4fa40

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
@@ -876,6 +876,9 @@ def inner_timout_checker():
876876
@click.option('--max-children', type=int)
877877
@click.argument('mutant_names', required=False, nargs=-1)
878878
def run(mutant_names, *, max_children):
879+
# used to copy the global mutmut.config to subprocesses
880+
set_start_method('fork')
881+
879882
assert isinstance(mutant_names, (tuple, list)), mutant_names
880883
_run(mutant_names, max_children)
881884

0 commit comments

Comments
 (0)