Skip to content

Commit a916504

Browse files
committed
[py]: Give more fine grained control to subprocess Popen calls for all services
1 parent cd88d18 commit a916504

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

py/selenium/webdriver/common/service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def __init__(
6868
self.creation_flags = kwargs.pop("creation_flags", 0)
6969
self.close_fds = kwargs.pop("close_fds") or system() != "Windows"
7070
self.env = env or os.environ
71+
self.popen_kw = kwargs.get("popen_kw", {})
7172

7273
@property
7374
def service_url(self) -> str:
@@ -207,6 +208,7 @@ def _start_process(self, path: str) -> None:
207208
stderr=self.log_file,
208209
stdin=PIPE,
209210
creationflags=self.creation_flags,
211+
**self.popen_kw,
210212
)
211213
logger.debug(f"Started executable: `{self.path}` in a child process with pid: {self.process.pid}")
212214
except TypeError:

0 commit comments

Comments
 (0)