diff options
Diffstat (limited to 'sys/compat/linux/linux_signal.c')
-rw-r--r-- | sys/compat/linux/linux_signal.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_signal.c b/sys/compat/linux/linux_signal.c index a3de140578c..67af421caef 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.14 2009/12/09 16:29:56 jsg Exp $ */ +/* $OpenBSD: linux_signal.c,v 1.15 2012/06/19 11:35:29 pirofti Exp $ */ /* $NetBSD: linux_signal.c,v 1.10 1996/04/04 23:51:36 christos Exp $ */ /* @@ -919,3 +919,28 @@ linux_sys_kill(p, v, retval) SCARG(&ka, signum) = linux_to_bsd_sig[SCARG(uap, signum)]; return (sys_kill(p, &ka, retval)); } + +int +linux_sys_tgkill(struct proc *p, void *v, register_t *retval) +{ + struct linux_sys_tgkill_args /* { + syscallarg(int) tgid; + syscallarg(int) tid; + syscallarg(int) sig; + }; */ *uap = v; + + int error; + int sig; + struct sys_kill_args ka; + + if (SCARG(uap, tgid) < 0 || SCARG(uap, tid) < 0) + return (EINVAL); + + if ((error = linux_to_bsd_signal(SCARG(uap, sig), &sig))) + return (error); + + /* XXX: Ignoring tgid, behaving like the obsolete linux_sys_tkill */ + SCARG(&ka, pid) = SCARG(uap, tid); + SCARG(&ka, signum) = sig; + return (sys_kill(p, &ka, retval)); +} |