commit 893c3f1f4a0bbba4c0d01f5c5ce0b69b92664326
parent d5ae6c5ff3a6e2bc5319001e1058de310e5a5887
Author: Kyle Milz <krwmilz@gmail.com>
Date: Thu, 26 Aug 2021 03:38:54 +0000
Assume we have waitpid()
Diffstat:
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/events.c b/events.c
@@ -44,7 +44,7 @@ NOTE:
#define XBell(dpy, percent) XkbBell(dpy, mane.win, percent, (Atom) None)
#include <signal.h>
-#include <sys/wait.h> /* we always need WNOHANG */
+#include <sys/wait.h> /* waitpid, WNOHANG */
#ifndef SIGPOLL
#define SIGPOLL SIGIO
@@ -2259,11 +2259,7 @@ do_sigchld()
sig_flags &= ~SF_CHLD;
for (;;) {
-#if HAVE_WAITPID
pid = waitpid(-1, &status, WNOHANG);
-#else
- pid = wait3(&status, WNOHANG, NULL);
-#endif
if (pid == 0) break;
if (pid != -1) {
@@ -2286,11 +2282,7 @@ do_sigchld()
if (errno == EINTR) continue;
if (errno == ECHILD) break;
-#if HAVE_WAITPID
perror("xdvi: waitpid");
-#else
- perror("xdvi: wait3");
-#endif
break;
}
}