@@ -251,7 +251,7 @@ def _stderr_loop(self) -> None:
251
251
def create_transport (config : TransportConfig , cwd : Optional [str ],
252
252
callback_object : TransportCallbacks ) -> Transport [Dict [str , Any ]]:
253
253
stderr = subprocess .PIPE
254
- pass_fds = () # type: Union[Tuple[()], Tuple[int]]
254
+ close_fds = True
255
255
if config .tcp_port is not None :
256
256
assert config .tcp_port is not None
257
257
if config .tcp_port < 0 :
@@ -263,7 +263,7 @@ def create_transport(config: TransportConfig, cwd: Optional[str],
263
263
stdout = subprocess .PIPE
264
264
stdin = subprocess .DEVNULL
265
265
stderr = subprocess .STDOUT
266
- pass_fds = ( config . node_ipc . child_connection . fileno (),)
266
+ close_fds = False
267
267
else :
268
268
stdout = subprocess .PIPE
269
269
stdin = subprocess .PIPE
@@ -273,7 +273,7 @@ def create_transport(config: TransportConfig, cwd: Optional[str],
273
273
process = None # type: Optional[subprocess.Popen]
274
274
275
275
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 )
277
277
278
278
if config .listener_socket :
279
279
assert isinstance (config .tcp_port , int ) and config .tcp_port > 0
@@ -356,7 +356,7 @@ def _start_subprocess(
356
356
startupinfo : Any ,
357
357
env : Dict [str , str ],
358
358
cwd : Optional [str ],
359
- pass_fds : Union [ Tuple [()], Tuple [ int ]]
359
+ close_fds : bool
360
360
) -> subprocess .Popen :
361
361
debug ("starting {} in {}" .format (args , cwd if cwd else os .getcwd ()))
362
362
process = subprocess .Popen (
@@ -367,7 +367,7 @@ def _start_subprocess(
367
367
startupinfo = startupinfo ,
368
368
env = env ,
369
369
cwd = cwd ,
370
- pass_fds = pass_fds )
370
+ close_fds = close_fds )
371
371
_subprocesses .add (process )
372
372
return process
373
373
0 commit comments