diff options
| author | 2001-04-02 21:43:10 +0000 | |
|---|---|---|
| committer | 2001-04-02 21:43:10 +0000 | |
| commit | 1e2a4b7de664136cad86537230bd68eb56844410 (patch) | |
| tree | c0245488cf1e184eeab8583de6b0869cff989cb1 /sys/compat/linux/linux_signal.c | |
| parent | ATA_POLL should have been AT_POLL (diff) | |
| download | wireguard-openbsd-1e2a4b7de664136cad86537230bd68eb56844410.tar.xz wireguard-openbsd-1e2a4b7de664136cad86537230bd68eb56844410.zip | |
On popular demand, the Linux-compatibility clone(2) implementation based
on NetBSD's code, as well as some faked Posix RT extensions by me. This makes
at least simple linuxthreads tests work.
Diffstat (limited to 'sys/compat/linux/linux_signal.c')
| -rw-r--r-- | sys/compat/linux/linux_signal.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index 6b1e78fb400..f6a1e856a92 100644 --- a/sys/compat/linux/linux_signal.c +++ b/sys/compat/linux/linux_signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_signal.c,v 1.7 2000/06/07 14:11:38 niklas Exp $ */ +/* $OpenBSD: linux_signal.c,v 1.8 2001/04/02 21:43:11 niklas Exp $ */ /* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */ /* @@ -73,12 +73,12 @@ int bsd_to_linux_sig[NSIG] = { LINUX_SIGILL, LINUX_SIGTRAP, LINUX_SIGABRT, - 0, /* SIGEMT */ + LINUX_NSIG, /* XXX Kludge to get RT signal #32 to work */ LINUX_SIGFPE, LINUX_SIGKILL, LINUX_SIGBUS, LINUX_SIGSEGV, - 0, /* SIGSYS */ + LINUX_NSIG + 1, /* XXX Kludge to get RT signal #32 to work */ LINUX_SIGPIPE, LINUX_SIGALRM, LINUX_SIGTERM, @@ -133,8 +133,8 @@ int linux_to_bsd_sig[LINUX__NSIG] = { SIGIO, 0, /* SIGUNUSED */ 0, - 0, - 0, + SIGEMT, /* XXX Gruesome hack for linuxthreads: */ + SIGSYS, /* Map 1st 2 RT signals onto ones we handle. */ 0, 0, 0, @@ -373,7 +373,7 @@ linux_sys_sigaction(p, v, retval) caddr_t sg; int error; - if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX_NSIG) + if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX__NSIG) return (EINVAL); sg = stackgap_init(p->p_emul); @@ -434,7 +434,7 @@ linux_sys_rt_sigaction(p, v, retval) if (SCARG(uap, sigsetsize) != sizeof(linux_sigset_t)) return (EINVAL); - if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX_NSIG) + if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX__NSIG) return (EINVAL); sg = stackgap_init(p->p_emul); @@ -496,7 +496,7 @@ linux_sys_signal(p, v, retval) struct sigaction *osa, *nsa, tmpsa; int error; - if (SCARG(uap, sig) < 0 || SCARG(uap, sig) >= LINUX_NSIG) + if (SCARG(uap, sig) < 0 || SCARG(uap, sig) >= LINUX__NSIG) return (EINVAL); sg = stackgap_init(p->p_emul); @@ -855,7 +855,7 @@ linux_sys_kill(p, v, retval) struct sys_kill_args ka; SCARG(&ka, pid) = SCARG(uap, pid); - if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX_NSIG) + if (SCARG(uap, signum) < 0 || SCARG(uap, signum) >= LINUX__NSIG) return (EINVAL); SCARG(&ka, signum) = linux_to_bsd_sig[SCARG(uap, signum)]; return (sys_kill(p, &ka, retval)); |
