mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove use of sysconf since it isn't available on windows anyway
This commit is contained in:
parent
6bd9287891
commit
cb24b0312e
@ -47,11 +47,6 @@ PARALLEL_FUNCS = {
|
|||||||
('calibre.ebooks.metadata.worker', 'save_book', 'notification'),
|
('calibre.ebooks.metadata.worker', 'save_book', 'notification'),
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
|
||||||
MAXFD = os.sysconf("SC_OPEN_MAX")
|
|
||||||
except:
|
|
||||||
MAXFD = 256
|
|
||||||
|
|
||||||
class Progress(Thread):
|
class Progress(Thread):
|
||||||
|
|
||||||
def __init__(self, conn):
|
def __init__(self, conn):
|
||||||
@ -85,7 +80,7 @@ def main():
|
|||||||
if iswindows:
|
if iswindows:
|
||||||
# Close open file descriptors inherited from parent
|
# Close open file descriptors inherited from parent
|
||||||
# On Unix this is done by the subprocess module
|
# 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:
|
if isosx and 'CALIBRE_WORKER_ADDRESS' not in os.environ:
|
||||||
# On some OS X computers launchd apparently tries to
|
# On some OS X computers launchd apparently tries to
|
||||||
# launch the last run process from the bundle
|
# launch the last run process from the bundle
|
||||||
|
Loading…
x
Reference in New Issue
Block a user