From 6bd9287891a6aad3da51d945877879e614523942 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Sep 2010 15:18:05 -0600 Subject: [PATCH] ... --- src/calibre/utils/ipc/worker.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/calibre/utils/ipc/worker.py b/src/calibre/utils/ipc/worker.py index 4d23d5a928..f237104827 100644 --- a/src/calibre/utils/ipc/worker.py +++ b/src/calibre/utils/ipc/worker.py @@ -13,7 +13,7 @@ from Queue import Queue from contextlib import closing from binascii import unhexlify from calibre import prints -from calibre.constants import iswindows +from calibre.constants import iswindows, isosx PARALLEL_FUNCS = { 'lrfviewer' : @@ -82,11 +82,10 @@ def get_func(name): return func, notification def main(): - # Close open file descriptors inherited from parent - # as windows locks open files if iswindows: + # Close open file descriptors inherited from parent + # On Unix this is done by the subprocess module os.closerange(3, MAXFD) - from calibre.constants import isosx if isosx and 'CALIBRE_WORKER_ADDRESS' not in os.environ: # On some OS X computers launchd apparently tries to # launch the last run process from the bundle