mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
cf5387baa2
commit
893799249b
@ -156,6 +156,7 @@ def start_pipe_worker(command, env=None, priority='normal'):
|
||||
pass
|
||||
niceness = {'normal' : 0, 'low' : 10, 'high' : 20}[priority]
|
||||
args['preexec_fn'] = partial(renice, niceness)
|
||||
args['close_fds'] = True
|
||||
|
||||
p = subprocess.Popen([w.executable, '--pipe-worker', command], **args)
|
||||
atexit.register(w.kill)
|
||||
|
Loading…
x
Reference in New Issue
Block a user