uloop: retry waitpid on signal interrupt
[project/libubox.git] / uloop.c
diff --git a/uloop.c b/uloop.c
index 6ef7210fae375cba63b28e6f6d7ca0b0b444f126..45f7c5d83858673885a1c602a6aa9ff189da8cdf 100644 (file)
--- a/uloop.c
+++ b/uloop.c
@@ -311,6 +311,9 @@ static void uloop_handle_processes(void)
 
        while (1) {
                pid = waitpid(-1, &ret, WNOHANG);
+               if (pid < 0 && errno == EINTR)
+                       continue;
+
                if (pid <= 0)
                        return;