From 8949992040a8f76942f5da0f3438233adf563f3b Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 7 Sep 2017 13:22:10 -0600 Subject: [PATCH] Set ec->cmnd_pid to the correct value when receiving the command's process ID from the monitor. --- src/exec_pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.40.0