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

Load wallet automatically 2.0 #1260

Merged
merged 13 commits into from
Jan 16, 2023
6 changes: 1 addition & 5 deletions src/subcommand/preview.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ struct KillOnDrop(process::Child);

impl Drop for KillOnDrop {
fn drop(&mut self) {
Command::new("kill")
.arg("-SIGINT")
.arg(self.0.id().to_string())
.spawn()
.expect("failed to SIGINT kill process");
self.0.kill().unwrap()
}
}

Expand Down
8 changes: 4 additions & 4 deletions tests/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ struct KillOnDrop(std::process::Child);

impl Drop for KillOnDrop {
fn drop(&mut self) {
Command::new("kill")
.arg("-SIGINT")
assert!(Command::new("kill")
.arg(self.0.id().to_string())
.spawn()
.expect("failed to SIGINT kill process");
.status()
.unwrap()
.success());
}
}

Expand Down