diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-02-12 05:47:37 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-02-12 05:47:37 +0000 |
commit | 8e02fc9161ef21267ca41f6abc206ce369dd4f65 (patch) | |
tree | 8647492ad5ea454a75458eda4e1d25ccfacc5660 /sys/compat | |
parent | ec955fc66522bb973747bfb4408e883be40b696f (diff) |
Eliminate the exit sig handling, which was only invokable via the
Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@
confirms Opera runs in compat without this, so out it goes; one less hair
to choke on in kern_exit.c
ok tedu@ pirofti@
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/linux/linux_misc.c | 7 | ||||
-rw-r--r-- | sys/compat/linux/linux_sched.c | 16 |
2 files changed, 9 insertions, 14 deletions
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index eda30fe40ff..f55f588da44 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.85 2014/01/23 04:11:46 tedu Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.86 2014/02/12 05:47:36 guenther Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /*- @@ -172,16 +172,13 @@ linux_sys_wait4(p, v, retval) linux_options = SCARG(uap, options); options = 0; - if (linux_options & - ~(LINUX_WAIT4_WNOHANG|LINUX_WAIT4_WUNTRACED|LINUX_WAIT4_WCLONE)) + if (linux_options & ~(LINUX_WAIT4_WNOHANG|LINUX_WAIT4_WUNTRACED)) return (EINVAL); if (linux_options & LINUX_WAIT4_WNOHANG) options |= WNOHANG; if (linux_options & LINUX_WAIT4_WUNTRACED) options |= WUNTRACED; - if (linux_options & LINUX_WAIT4_WCLONE) - options |= WALTSIG; if ((error = dowait4(p, SCARG(uap, pid), SCARG(uap, status) ? &status : NULL, options, diff --git a/sys/compat/linux/linux_sched.c b/sys/compat/linux/linux_sched.c index 04fb2fec1b8..fa071ca93c9 100644 --- a/sys/compat/linux/linux_sched.c +++ b/sys/compat/linux/linux_sched.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_sched.c,v 1.15 2014/01/20 21:19:28 guenther Exp $ */ +/* $OpenBSD: linux_sched.c,v 1.16 2014/02/12 05:47:36 guenther Exp $ */ /* $NetBSD: linux_sched.c,v 1.6 2000/05/28 05:49:05 thorpej Exp $ */ /*- @@ -61,7 +61,7 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval) struct linux_sys_clone_args *uap = v; struct linux_emuldata *emul = p->p_emuldata; int cflags = SCARG(uap, flags); - int flags = FORK_TFORK, sig; + int flags = FORK_TFORK; int error = 0; /* @@ -130,18 +130,16 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval) if ((cflags & (LINUX_CLONE_FS | LINUX_CLONE_FILES)) == LINUX_CLONE_FS) return (EINVAL); + + /* We don't support alternate exit signals. */ + if ((cflags & LINUX_CLONE_CSIGNAL) != LINUX_SIGCHLD) + return (EINVAL); } /* * Since we don't support CLONE_PTRACE, the CLONE_UNTRACED * flag can be silently ignored. CLONE_DETACHED is always * ignored by Linux. */ - - sig = cflags & LINUX_CLONE_CSIGNAL; - if (sig < 0 || sig >= LINUX__NSIG) - return (EINVAL); - sig = linux_to_bsd_sig[sig]; - if (cflags & LINUX_CLONE_CHILD_SETTID) emul->child_set_tid = SCARG(uap, child_tidptr); else @@ -177,7 +175,7 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval) * or down. So, we pass a stack size of 0, so that the code * that makes this adjustment is a noop. */ - error = fork1(p, sig, flags, SCARG(uap, stack), 0, linux_child_return, + error = fork1(p, flags, SCARG(uap, stack), 0, linux_child_return, NULL, retval, NULL); if (error) return error; |