From b16ede44fb08f466444ae1b7f4ac38d3ad9d58e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 30 Sep 2010 13:35:04 -0600 Subject: [PATCH] Close open file descriptors in calibre worker processes --- src/calibre/utils/ipc/worker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/utils/ipc/worker.py b/src/calibre/utils/ipc/worker.py index b7510426aa..abdd095d62 100644 --- a/src/calibre/utils/ipc/worker.py +++ b/src/calibre/utils/ipc/worker.py @@ -76,6 +76,8 @@ def get_func(name): return func, notification def main(): + # Close open file descriptors inherited from parent + os.closerange(3, 1000) from calibre.constants import isosx if isosx and 'CALIBRE_WORKER_ADDRESS' not in os.environ: # On some OS X computers launchd apparently tries to