Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Aug 2021 08:56:02 GMT
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: c5fc9fe7f36a - main - linux(4): Implement CLONE_CLEAR_SIGHAND option bit.
Message-ID:  <202108120856.17C8u25I064047@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dchagin:

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

commit c5fc9fe7f36a742e567173b2e3d65252140013d1
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-08-12 08:55:35 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2021-08-12 08:55:35 +0000

    linux(4): Implement CLONE_CLEAR_SIGHAND option bit.
    
    CLONE_CLEAR_SIGHAND is designed to reset all signal handlers of the child
    not set to SIG_IGN to SIG_DFL.
    
    Reviewed by:            kib
    Differential revision:  https://reviews.freebsd.org/D31481
    MFC after:              2 weeks
---
 sys/compat/linux/linux_fork.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c
index db3e9e1ea27b..77dd8446c588 100644
--- a/sys/compat/linux/linux_fork.c
+++ b/sys/compat/linux/linux_fork.c
@@ -151,6 +151,8 @@ linux_clone_proc(struct thread *td, struct l_clone_args *args)
 		ff |= RFMEM;
 	if (args->flags & LINUX_CLONE_SIGHAND)
 		ff |= RFSIGSHARE;
+	if ((args->flags & LINUX_CLONE_CLEAR_SIGHAND) != 0)
+		f2 |= FR2_DROPSIG_CAUGHT;
 	if (args->flags & LINUX_CLONE_FILES) {
 		if (!(args->flags & LINUX_CLONE_FS))
 			f2 |= FR2_SHARE_PATHS;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108120856.17C8u25I064047>