From: Arran Cudbard-Bell Date: Fri, 27 Aug 2021 23:59:48 +0000 (-0500) Subject: Fix spurious warning X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc99a3f9a99a64c6b7dcd65e393e973cfabb3c4c;p=thirdparty%2Ffreeradius-server.git Fix spurious warning --- diff --git a/src/lib/server/exec.c b/src/lib/server/exec.c index 6de1528de3e..a2ba8932d06 100644 --- a/src/lib/server/exec.c +++ b/src/lib/server/exec.c @@ -959,17 +959,14 @@ static void exec_waitpid(fr_event_list_t *el, UNUSED pid_t pid, int status, void */ } else if (ret == 0) { RWDEBUG("Something reaped PID %d before us!", exec->pid); - /* - * This could be an implementation specific issue - * so don't assert. - */ - } else if (wait_status != status) { - RWDEBUG("Exit status from waitpid (%d) and kevent (%d) disagree", wait_status, status); } if (WIFEXITED(status)) { RDEBUG("Program exited with status code %d", WEXITSTATUS(status)); exec->status = WEXITSTATUS(status); + + if (exec->status != status) RWDEBUG("Exit status from waitpid (%d) and kevent (%d) disagree", + wait_status, status); } else if (WIFSIGNALED(status)) { RDEBUG("Program exited due to signal with status code %d", WTERMSIG(status)); exec->status = -WTERMSIG(status);