summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 58a0aebad3..11f77abde1 100644
--- a/src/util.c
+++ b/src/util.c
@@ -4623,11 +4623,12 @@ void execute_directory(const char *directory, DIR *d, char *argv[]) {
}
while (!hashmap_isempty(pids)) {
+ pid_t pid = PTR_TO_UINT(hashmap_first_key(pids));
siginfo_t si;
char *path;
zero(si);
- if (waitid(P_ALL, 0, &si, WEXITED) < 0) {
+ if (waitid(P_PID, pid, &si, WEXITED) < 0) {
if (errno == EINTR)
continue;