From 8b788b7e95a054fdd333a02fc9b01c4479042547 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 29 Aug 2011 18:54:28 -0600 Subject: [PATCH] ... --- src/calibre/utils/ipc/worker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/utils/ipc/worker.py b/src/calibre/utils/ipc/worker.py index f2368bb495..1381abbc2d 100644 --- a/src/calibre/utils/ipc/worker.py +++ b/src/calibre/utils/ipc/worker.py @@ -152,6 +152,12 @@ def get_func(name): def main(): if iswindows: + if '--multiprocessing-fork' in sys.argv: + # We are using the multiprocessing module on windows to launch a + # worker process + from multiprocessing import freeze_support + freeze_support() + return 0 # Close open file descriptors inherited from parent # On Unix this is done by the subprocess module os.closerange(3, 256)