This commit is contained in:
Kovid Goyal 2014-03-04 07:27:26 +05:30
parent cf5387baa2
commit 893799249b

View File

@ -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)