fix custom module leaves zombie processes behind when bars are removed

fixes #1713.
This commit is contained in:
lilydjwg 2022-10-27 18:12:14 +08:00
parent c374c412d3
commit 31137c30fb
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ waybar::modules::Custom::Custom(const std::string& name, const std::string& id,
waybar::modules::Custom::~Custom() {
if (pid_ != -1) {
killpg(pid_, SIGTERM);
waitpid(pid_, NULL, 0);
pid_ = -1;
}
}