Fix for leftover pids
This commit is contained in:
@ -27,8 +27,13 @@ waybar::modules::Custom::~Custom() {
|
|||||||
|
|
||||||
void waybar::modules::Custom::delayWorker() {
|
void waybar::modules::Custom::delayWorker() {
|
||||||
thread_ = [this] {
|
thread_ = [this] {
|
||||||
std::for_each(this->pid_children_.cbegin(), this->pid_children_.cend(),
|
for( int i : this->pid_children_ )
|
||||||
[](int i){ wait(&i); });
|
{
|
||||||
|
int status;
|
||||||
|
waitpid(i, &status, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
this->pid_children_.clear();
|
||||||
|
|
||||||
bool can_update = true;
|
bool can_update = true;
|
||||||
if (config_["exec-if"].isString()) {
|
if (config_["exec-if"].isString()) {
|
||||||
|
Reference in New Issue
Block a user