aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2021-08-12 08:55:35 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2021-08-12 08:55:35 +0000
commitc5fc9fe7f36a742e567173b2e3d65252140013d1 (patch)
tree8d693e5825df8ff1bf9f3c60431246f76306156b
parenta796845d6de083971eef2d2a33ccc74fcd609ec7 (diff)
downloadsrc-c5fc9fe7f36a742e567173b2e3d65252140013d1.tar.gz
src-c5fc9fe7f36a742e567173b2e3d65252140013d1.zip
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
-rw-r--r--sys/compat/linux/linux_fork.c2
1 files changed, 2 insertions, 0 deletions
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;