From: Todd C. Miller Date: Tue, 25 Sep 2012 17:31:20 +0000 (-0400) Subject: Handle SIGCONT_FG and SIGCONT_BG when converting signal number to X-Git-Tag: SUDO_1_8_7~1^2~382 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=616d713e9b8f60fa56132bc1106b7133e87b0346;p=sudo Handle SIGCONT_FG and SIGCONT_BG when converting signal number to string in deliver_signal(). --- diff --git a/src/exec_pty.c b/src/exec_pty.c index f02b87344..ddfd67be7 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -830,7 +830,11 @@ deliver_signal(pid_t pid, int signo, bool from_parent) int status; debug_decl(deliver_signal, SUDO_DEBUG_EXEC); - if (sig2str(signo, signame) == -1) + if (signo == SIGCONT_FG) + strlcpy(signame, "CONT_FG", sizeof(signame)); + else if (signo == SIGCONT_BG) + strlcpy(signame, "CONT_BG", sizeof(signame)); + else if (sig2str(signo, signame) == -1) snprintf(signame, sizeof(signame), "%d", signo); /* Handle signal from parent. */