1
0
forked from VimPlug/jedi

Use close_fds for posix.

This commit is contained in:
Dave Halter
2018-08-03 13:08:07 +02:00
parent 30d14ea016
commit ccb460b433

View File

@@ -521,6 +521,9 @@ class GeneralizedPopen(subprocess.Popen):
except AttributeError: except AttributeError:
CREATE_NO_WINDOW = 0x08000000 CREATE_NO_WINDOW = 0x08000000
kwargs['creationflags'] = CREATE_NO_WINDOW kwargs['creationflags'] = CREATE_NO_WINDOW
# The child process doesn't need file descriptors except 0, 1, 2.
# This is unix only.
kwargs['close_fds'] = 'posix' in sys.builtin_module_names
super(GeneralizedPopen, self).__init__(*args, **kwargs) super(GeneralizedPopen, self).__init__(*args, **kwargs)