Skip to content

Commit 2492048

Browse files
committed
Fix Windows
1 parent 93157e7 commit 2492048

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugin/core/transports.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def _stderr_loop(self) -> None:
251251
def create_transport(config: TransportConfig, cwd: Optional[str],
252252
callback_object: TransportCallbacks) -> Transport[Dict[str, Any]]:
253253
stderr = subprocess.PIPE
254-
pass_fds = () # type: Union[Tuple[()], Tuple[int]]
254+
close_fds = True
255255
if config.tcp_port is not None:
256256
assert config.tcp_port is not None
257257
if config.tcp_port < 0:
@@ -263,7 +263,7 @@ def create_transport(config: TransportConfig, cwd: Optional[str],
263263
stdout = subprocess.PIPE
264264
stdin = subprocess.DEVNULL
265265
stderr = subprocess.STDOUT
266-
pass_fds = (config.node_ipc.child_connection.fileno(),)
266+
close_fds = False
267267
else:
268268
stdout = subprocess.PIPE
269269
stdin = subprocess.PIPE
@@ -273,7 +273,7 @@ def create_transport(config: TransportConfig, cwd: Optional[str],
273273
process = None # type: Optional[subprocess.Popen]
274274

275275
def start_subprocess() -> subprocess.Popen:
276-
return _start_subprocess(config.command, stdin, stdout, stderr, startupinfo, config.env, cwd, pass_fds)
276+
return _start_subprocess(config.command, stdin, stdout, stderr, startupinfo, config.env, cwd, close_fds)
277277

278278
if config.listener_socket:
279279
assert isinstance(config.tcp_port, int) and config.tcp_port > 0
@@ -356,7 +356,7 @@ def _start_subprocess(
356356
startupinfo: Any,
357357
env: Dict[str, str],
358358
cwd: Optional[str],
359-
pass_fds: Union[Tuple[()], Tuple[int]]
359+
close_fds: bool
360360
) -> subprocess.Popen:
361361
debug("starting {} in {}".format(args, cwd if cwd else os.getcwd()))
362362
process = subprocess.Popen(
@@ -367,7 +367,7 @@ def _start_subprocess(
367367
startupinfo=startupinfo,
368368
env=env,
369369
cwd=cwd,
370-
pass_fds=pass_fds)
370+
close_fds=close_fds)
371371
_subprocesses.add(process)
372372
return process
373373

0 commit comments

Comments
 (0)