]> granicus.if.org Git - sudo/commitdiff
Set ec->cmnd_pid to the correct value when receiving the command's
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 7 Sep 2017 19:22:10 +0000 (13:22 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 7 Sep 2017 19:22:10 +0000 (13:22 -0600)
process ID from the monitor.

src/exec_pty.c

index 309c9b34b726c512f61983b102d30af8388cd3dc..61a9fdc03ca9dece3733d7ab3027ab3e66705f7e 100644 (file)
@@ -801,7 +801,7 @@ backchannel_cb(int fd, int what, void *v)
            /* Check command status. */
            switch (cstat.type) {
            case CMD_PID:
-               ec->cmnd_pid = ec->cstat->val;
+               ec->cmnd_pid = cstat.val;
                sudo_debug_printf(SUDO_DEBUG_INFO, "executed %s, pid %d",
                    ec->details->command, (int)ec->cmnd_pid);
                break;