Skip to content

Commit

Permalink
Fix Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alecmev committed Aug 13, 2022
1 parent 93157e7 commit 79a10ae
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions plugin/core/transports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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

Expand Down

0 comments on commit 79a10ae

Please sign in to comment.