git: c8c93b151678 - main - linux: Also translate the signal if the code is CLD_KILLED

From: Edward Tomasz Napierala <trasz_at_FreeBSD.org>
Date: Fri, 29 Oct 2021 14:28:19 UTC
The branch main has been updated by trasz:

URL: https://cgit.FreeBSD.org/src/commit/?id=c8c93b151678b57d86cd50509c9cbb863bbe9e57

commit c8c93b151678b57d86cd50509c9cbb863bbe9e57
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-10-29 13:56:43 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-10-29 14:28:00 +0000

    linux: Also translate the signal if the code is CLD_KILLED
    
    This fixes ./waitid.gen.test from the strace(1) test suite.
    
    Reviewed By:    kib
    Sponsored By:   EPSRC
    Differential Revision:  https://reviews.freebsd.org/D32617
---
 sys/compat/linux/linux_signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c
index 0c71d510e0f2..786bcab2bf5e 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -688,7 +688,7 @@ siginfo_to_lsiginfo(const siginfo_t *si, l_siginfo_t *lsi, l_int sig)
 			lsi->lsi_pid = si->si_pid;
 			lsi->lsi_uid = si->si_uid;
 
-			if (si->si_code == CLD_STOPPED)
+			if (si->si_code == CLD_STOPPED || si->si_code == CLD_KILLED)
 				lsi->lsi_status = bsd_to_linux_signal(si->si_status);
 			else if (si->si_code == CLD_CONTINUED)
 				lsi->lsi_status = bsd_to_linux_signal(SIGCONT);