diff --git a/script/local.py b/script/local.py index e9e5c8a..83d354f 100644 --- a/script/local.py +++ b/script/local.py @@ -6,9 +6,20 @@ from threading import Thread import threading import traceback import queue -#import multiprocessing + +import zmq +zmq.LINGER = 0 + import multiprocessing as mp -mp.set_start_method('fork') +mp_spawn = mp.get_context('spawn') +mp_fork = mp.get_context('fork') + + + +def no_exit(code): + raise Exception("System exit with code: " + str(code)) +sys.exit = no_exit + #Workaround for zmq being a java package and having priority for import over python zmq package