From 17dc764f3762a34941e278e5f4de8e4eee33d7dd Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Mon, 9 Sep 2019 11:36:28 +0300 Subject: [PATCH] Add support for MP in Windows PyInstaller --- monkey/infection_monkey/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/infection_monkey/main.py b/monkey/infection_monkey/main.py index 2ddf9127e..ca5bb9832 100644 --- a/monkey/infection_monkey/main.py +++ b/monkey/infection_monkey/main.py @@ -7,6 +7,7 @@ import logging.config import os import sys import traceback +from multiprocessing import freeze_support import infection_monkey.utils as utils from infection_monkey.config import WormConfiguration, EXTERNAL_CONFIG_FILE @@ -43,7 +44,7 @@ def main(): if 2 > len(sys.argv): return True - + freeze_support() # required for multiprocessing + pyinstaller on windows monkey_mode = sys.argv[1] if not (monkey_mode in [MONKEY_ARG, DROPPER_ARG]):