You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When shutting down `Selenium::WebDriver::ServiceManager#stop_server`
issues a `/shutdown` request against the webdriver server and the
server exits cleanly, however the mechanism to assert if the child
process is up or not cannot distinguish between busy or not found.
`Selenium::WebDriver::ChildProcess#exited?` returns `false` when the
process is still alive because
`Selenium::WebDriver::ChildProcess#waitpid2` returns `nil`.
However, by catching `Errno::ECHILD` and `Errno::ESRCH` and returning
`nil` `#waitpid2` masks a not running pid as "running" delaying the
shutdown procedure when the server was already gone.
This patch moves the exception handling away from the `Process` wrappers
so its closer to the decision points in
`Selenium::WebDriver::ChildProcess#exited?` and
`Selenium::WebDriver::ChildProcess#stop`.
Addresses a similar inconsistency in #14032
0 commit comments