We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SIGKILL
sigterm
1 parent 18a23ad commit 6a47cc3Copy full SHA for 6a47cc3
py/selenium/webdriver/common/service.py
@@ -167,9 +167,14 @@ def _terminate_process(self) -> None:
167
except AttributeError:
168
pass
169
self.process.terminate()
170
- self.process.wait(60)
171
- # Todo: only SIGKILL if necessary; the process may be cleanly exited by now.
172
- self.process.kill()
+ try:
+ self.process.wait(60)
+ except TimeoutError:
173
+ logger.error(
174
+ "Service process refused to terminate gracefully with SIGTERM, escalating to SIGKILL.",
175
+ exc_info=True,
176
+ )
177
+ self.process.kill()
178
except OSError:
179
logger.error("Error terminating service process.", exc_info=True)
180
0 commit comments