mirror of
https://gitlab.com/hyask/swaysome.git
synced 2025-12-10 07:44:43 +01:00
tests: make sure sway's subprocesses are killed before killing sway
This fixes the tests when run within Debian's autopkgtest. Since there were still some living child processes, autopkgtest was stuck waiting for them forever.
This commit is contained in:
parent
351cb5dd66
commit
75806d081f
1 changed files with 4 additions and 0 deletions
|
|
@ -107,6 +107,10 @@ impl Sway {
|
|||
}
|
||||
|
||||
fn stop(&mut self) {
|
||||
// in case some apps were spawned, kill them, and give them some time to be killed
|
||||
self.send_command(["[all] kill"].as_slice());
|
||||
std::thread::sleep(std::time::Duration::from_millis(500));
|
||||
// now terminate sway
|
||||
signal(self.process.id(), "TERM");
|
||||
match self.check_connection("Unable to connect to") {
|
||||
Ok(()) => eprintln!("Sway terminated correctly on its own"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue