Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webdriver): windows: make native webdriver close with parent process (fix #8610) #10108

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 122 additions & 8 deletions tooling/webdriver/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions tooling/webdriver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ which = "4"
[target."cfg(unix)".dependencies]
signal-hook = "0.3"
signal-hook-tokio = { version = "0.3", features = [ "futures-v0_3" ] }

[target."cfg(windows)".dependencies]
win32job = "=2.0.0"
9 changes: 9 additions & 0 deletions tooling/webdriver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ mod webdriver;
fn main() {
let args = pico_args::Arguments::from_env().into();

#[cfg(windows)]
let _ = {
use win32job::Job;
let job = Job::create().unwrap();
let mut info = job.query_extended_limit_info().unwrap();
job.set_extended_limit_info(&mut info).unwrap();
job.assign_current_process().unwrap();
};

// start the native webdriver on the port specified in args
let mut driver = webdriver::native(&args);
let driver = driver
Expand Down
Loading