Check for WIFSTOPPED/WIFCONTINUED with wait4
authorJagger <robert@swiecki.net>
Sun, 28 Feb 2016 23:32:14 +0000 (00:32 +0100)
committerJagger <robert@swiecki.net>
Sun, 28 Feb 2016 23:32:14 +0000 (00:32 +0100)
net.c

diff --git a/net.c b/net.c
index 9b76a865686a1d298d677bc3996fffd67ac9afad..f24d4b05ec5fe6aab8e5f60d67096953e380aebd 100644 (file)
--- a/net.c
+++ b/net.c
@@ -74,6 +74,12 @@ static bool netSystemSbinIp(struct nsjconf_t *nsjconf, char *const *argv)
                        LOG_W("'/sbin/ip' killed with signal: %d", WTERMSIG(status));
                        return false;
                }
+               if (WIFSTOPPED(status)) {
+                       continue;
+               }
+               if (WIFCONTINUED(status)) {
+                       continue;
+               }
                LOG_W("Unknown exit status for '/sbin/ip' (pid=%d): %d", pid, status);
                kill(pid, SIGKILL);
        }