From: Todd C. Miller Date: Thu, 7 Sep 2017 19:22:10 +0000 (-0600) Subject: Set ec->cmnd_pid to the correct value when receiving the command's X-Git-Tag: SUDO_1_8_22^2~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8949992040a8f76942f5da0f3438233adf563f3b;p=sudo Set ec->cmnd_pid to the correct value when receiving the command's process ID from the monitor. --- diff --git a/src/exec_pty.c b/src/exec_pty.c index 309c9b34b..61a9fdc03 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -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;