From cb24b0312e44eff427c223e4c61ed3e17c3c099a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Sep 2010 15:31:39 -0600 Subject: [PATCH] Remove use of sysconf since it isn't available on windows anyway --- src/calibre/utils/ipc/worker.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/calibre/utils/ipc/worker.py b/src/calibre/utils/ipc/worker.py index f237104827..e3584380a1 100644 --- a/src/calibre/utils/ipc/worker.py +++ b/src/calibre/utils/ipc/worker.py @@ -47,11 +47,6 @@ PARALLEL_FUNCS = { ('calibre.ebooks.metadata.worker', 'save_book', 'notification'), } -try: - MAXFD = os.sysconf("SC_OPEN_MAX") -except: - MAXFD = 256 - class Progress(Thread): def __init__(self, conn): @@ -85,7 +80,7 @@ def main(): if iswindows: # Close open file descriptors inherited from parent # On Unix this is done by the subprocess module - os.closerange(3, MAXFD) + os.closerange(3, 256) 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