]> granicus.if.org Git - sudo/commitdiff
Handle SIGCONT_FG and SIGCONT_BG when converting signal number to
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 25 Sep 2012 17:31:20 +0000 (13:31 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 25 Sep 2012 17:31:20 +0000 (13:31 -0400)
string in deliver_signal().

src/exec_pty.c

index f02b8734439b303eb1d6d92ed78dec003796de26..ddfd67be7924f0c4eea07fd5614a9b7373c8b995 100644 (file)
@@ -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. */