]> granicus.if.org Git - sudo/commitdiff
Add debug warning when we have wait status but don't overwrite the
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Jun 2017 13:51:02 +0000 (07:51 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 15 Jun 2017 13:51:02 +0000 (07:51 -0600)
existing cstat.

src/exec_monitor.c
src/exec_nopty.c

index 47b0227dcaceb499582fbb036621171e168d259b..b8dc133be051bab6ba32f80f1fa0f02092088303 100644 (file)
@@ -211,6 +211,10 @@ mon_handle_sigchld(struct monitor_closure *mc)
                send_status(mc->backchannel, mc->cstat);
            }
        }
+    } else {                       
+       sudo_debug_printf(SUDO_DEBUG_WARN,
+           "%s: not overwriting command status %d,%d with %d,%d",
+           __func__, mc->cstat->type, mc->cstat->val, CMD_WSTATUS, status);
     }
 
     debug_return;
index 77362eaa0f6c5c2322c77375a4dc9b82b73d5693..c4780dc1ca50e116c9cd304d1b75a23e60863757 100644 (file)
@@ -553,6 +553,10 @@ handle_sigchld_nopty(struct exec_closure_nopty *ec)
        if (ec->cstat->type == CMD_INVALID) {
            ec->cstat->type = CMD_WSTATUS;
            ec->cstat->val = status;
+       } else {
+           sudo_debug_printf(SUDO_DEBUG_WARN,
+               "%s: not overwriting command status %d,%d with %d,%d",
+               __func__, ec->cstat->type, ec->cstat->val, CMD_WSTATUS, status);
        }
        ec->cmnd_pid = -1;
     }