From 5e502bd6d6161d3c18ef2bb8a7fe2757594846af Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 31 Jul 2012 13:36:48 -0400 Subject: [PATCH] When checking whether a signal is user-generated, compare si_code against SI_USER instead of <= 0 since on HP-UX, terminal-related signals get a code of 0. --- src/exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exec.c b/src/exec.c index fd5cb26ae..d93549813 100644 --- a/src/exec.c +++ b/src/exec.c @@ -636,7 +636,7 @@ handler_nofwd(int s, siginfo_t *info, void *context) unsigned char signo = (unsigned char)s; /* Only forward user-generated signals. */ - if (info == NULL || info->si_code <= 0) { + if (info != NULL && info->si_code == SI_USER) { /* * The pipe is non-blocking, if we overflow the kernel's pipe * buffer we drop the signal. This is not a problem in practice. -- 2.40.0