git: ecfdca569820 - stable/13 - linux: Also translate the signal if the code is CLD_KILLED

From: Edward Tomasz Napierala <trasz_at_FreeBSD.org>
Date: Thu, 17 Feb 2022 12:54:35 UTC
The branch stable/13 has been updated by trasz:

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

commit ecfdca569820c5b88a74442b6335212aa57009aa
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-10-29 13:56:43 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2022-02-13 22:25:28 +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
    
    (cherry picked from commit c8c93b151678b57d86cd50509c9cbb863bbe9e57)
---
 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 51f08d61bef1..71b00da569dc 100644
--- a/sys/compat/linux/linux_signal.c
+++ b/sys/compat/linux/linux_signal.c
@@ -635,7 +635,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);