diff --git a/plugin/core/transports.py b/plugin/core/transports.py index 01564166b..f9e534bf0 100644 --- a/plugin/core/transports.py +++ b/plugin/core/transports.py @@ -251,7 +251,6 @@ def _stderr_loop(self) -> None: def create_transport(config: TransportConfig, cwd: Optional[str], callback_object: TransportCallbacks) -> Transport[Dict[str, Any]]: stderr = subprocess.PIPE - pass_fds = () # type: Union[Tuple[()], Tuple[int]] if config.tcp_port is not None: assert config.tcp_port is not None if config.tcp_port < 0: @@ -263,7 +262,6 @@ def create_transport(config: TransportConfig, cwd: Optional[str], stdout = subprocess.PIPE stdin = subprocess.DEVNULL stderr = subprocess.STDOUT - pass_fds = (config.node_ipc.child_connection.fileno(),) else: stdout = subprocess.PIPE stdin = subprocess.PIPE @@ -273,7 +271,7 @@ def create_transport(config: TransportConfig, cwd: Optional[str], process = None # type: Optional[subprocess.Popen] def start_subprocess() -> subprocess.Popen: - return _start_subprocess(config.command, stdin, stdout, stderr, startupinfo, config.env, cwd, pass_fds) + return _start_subprocess(config.command, stdin, stdout, stderr, startupinfo, config.env, cwd) if config.listener_socket: assert isinstance(config.tcp_port, int) and config.tcp_port > 0 @@ -355,8 +353,7 @@ def _start_subprocess( stderr: int, startupinfo: Any, env: Dict[str, str], - cwd: Optional[str], - pass_fds: Union[Tuple[()], Tuple[int]] + cwd: Optional[str] ) -> subprocess.Popen: debug("starting {} in {}".format(args, cwd if cwd else os.getcwd())) process = subprocess.Popen( @@ -367,7 +364,7 @@ def _start_subprocess( startupinfo=startupinfo, env=env, cwd=cwd, - pass_fds=pass_fds) + close_fds=False) _subprocesses.add(process) return process