mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-04-20 16:58:54 -04:00
Fix multiprocessing forkserver not working with python 3.14.4
Because of this: https://github.com/python/cpython/pull/148195
This commit is contained in:
parent
92fc9eb5c8
commit
771315bb3e
@ -166,8 +166,9 @@ def get_func(name):
|
||||
|
||||
def main():
|
||||
if '__multiprocessing__' in sys.argv:
|
||||
payload = sys.argv[-1]
|
||||
sys.argv = [sys.argv[0], '--multiprocessing-fork']
|
||||
idx = sys.argv.index('__multiprocessing__')
|
||||
payload = sys.argv[idx+1]
|
||||
sys.argv = [sys.argv[0], '--multiprocessing-fork'] + sys.argv[idx + 2:]
|
||||
exec(payload)
|
||||
return 0
|
||||
if ismacos and 'CALIBRE_WORKER_FD' not in os.environ and 'CALIBRE_SIMPLE_WORKER' not in os.environ and '--pipe-worker' not in sys.argv:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user