git: 3af6bc9d02cd - stable/13 - linux(4): Implement CLONE_CLEAR_SIGHAND option bit.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jun 2022 19:38:05 UTC
The branch stable/13 has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=3af6bc9d02cd65f65f8301927f1b1564b7aa1c31
commit 3af6bc9d02cd65f65f8301927f1b1564b7aa1c31
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2021-08-12 08:55:35 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-17 19:33:31 +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
(cherry picked from commit c5fc9fe7f36a742e567173b2e3d65252140013d1)
---
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;