aboutsummaryrefslogtreecommitdiffstats
path: root/src/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notify.c')
-rw-r--r--src/notify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/notify.c b/src/notify.c
index a24beb2..036af0f 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -34,6 +34,7 @@
*
*/
+#include <sys/wait.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
@@ -358,6 +359,9 @@ static void *notify_main_thread(void *arg)
pthread_mutex_unlock(&notify.mutex);
notify_update_bar();
psleep(thread_sleep);
+ /* Reap the user-defined notifications. */
+ while (waitpid(0, NULL, WNOHANG) > 0)
+ ;
elapse += thread_sleep;
if (elapse >= check_app) {
elapse = 0;