process_standard: Do not log at level 2 every time a child exits
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 18 Sep 2017 01:02:13 +0000 (13:02 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 19 Oct 2017 03:33:10 +0000 (05:33 +0200)
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/smbd/process_standard.c

index a17a1ec3b067857ac774998b483413148f81b512..6d3432918ba96dbc5e001dd4b3679fc1f65595d5 100644 (file)
@@ -148,8 +148,10 @@ static void standard_child_pipe_handler(struct tevent_context *ev,
        }
        if (WIFEXITED(status)) {
                status = WEXITSTATUS(status);
-               DEBUG(2, ("Child %d (%s) exited with status %d\n",
-                         (int)state->pid, state->name, status));
+               if (status != 0) {
+                       DBG_ERR("Child %d (%s) exited with status %d\n",
+                               (int)state->pid, state->name, status);
+               }
        } else if (WIFSIGNALED(status)) {
                status = WTERMSIG(status);
                DEBUG(0, ("Child %d (%s) terminated with signal %d\n",