Skip to content

Commit

Permalink
pkill bandwhich at exit
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaSd committed Sep 12, 2020
1 parent 2fc0f71 commit cb464a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/eltrafico_main/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ fn build_ui(application: &gtk::Application) {
if !pid.is_empty() {
run!("pkexec pkill nethogs").expect("Error stopping nethogs");
}
// stop bandwhich
let pid = String::from_utf8(run!("pidof bandwhich").unwrap().stdout).unwrap();
if !pid.is_empty() {
run!("pkexec pkill bandwhich").expect("Error stopping bandwhich");
}

// stop tc thread
// tc will send a STOP msg back to the main thread so it can exit
writeln!(stdin_c.borrow_mut().as_mut().unwrap(), "{}", Message::Stop)
Expand Down

0 comments on commit cb464a9

Please sign in to comment.