Commit 053faf09 authored by Denis Bilenko's avatar Denis Bilenko

subprocess: use built-in fork rather than gevent.fork since we don't need to...

subprocess: use built-in fork rather than gevent.fork since we don't need to reinit libev in the child
parent 4d0ed0cd
...@@ -97,6 +97,10 @@ else: ...@@ -97,6 +97,10 @@ else:
import pickle import pickle
from gevent import monkey
fork = monkey.get_original('os', 'fork')
def call(*popenargs, **kwargs): def call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete, then """Run command with arguments. Wait for command to complete, then
return the returncode attribute. return the returncode attribute.
...@@ -605,7 +609,7 @@ class Popen(object): ...@@ -605,7 +609,7 @@ class Popen(object):
# write to stderr -> hang. http://bugs.python.org/issue1336 # write to stderr -> hang. http://bugs.python.org/issue1336
gc.disable() gc.disable()
try: try:
self.pid = os.fork() self.pid = fork()
except: except:
if gc_was_enabled: if gc_was_enabled:
gc.enable() gc.enable()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment