From 9355015b3c20cf251e8bf6efd141338ca2e660fb Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Tue, 20 Sep 2016 22:17:04 +0200 Subject: [PATCH] [main] Use waitpid instead of obsolete wait3 --- src/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 4d24f96c..3c0f07dd 100644 --- a/src/main.c +++ b/src/main.c @@ -346,9 +346,9 @@ signal_signalfd_cb(int fd, short event, void *arg) switch (info.ssi_signo) { case SIGCHLD: - DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD, reaping children\n"); + DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD\n"); - while (wait3(&status, WNOHANG, NULL) > 0) + while (waitpid(-1, &status, WNOHANG) > 0) /* Nothing. */ ; break; @@ -391,9 +391,9 @@ signal_kqueue_cb(int fd, short event, void *arg) switch (ke.ident) { case SIGCHLD: - DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD, reaping children\n"); + DPRINTF(E_LOG, L_MAIN, "Got SIGCHLD\n"); - while (wait3(&status, WNOHANG, NULL) > 0) + while (waitpid(-1, &status, WNOHANG) > 0) /* Nothing. */ ; break;