| 1838 | } |
| 1839 | |
| 1840 | int |
| 1841 | sys_pdkill(struct thread *td, struct pdkill_args *uap) |
| 1842 | { |
| 1843 | struct proc *p; |
| 1844 | int error; |
| 1845 | |
| 1846 | AUDIT_ARG_SIGNUM(uap->signum); |
| 1847 | AUDIT_ARG_FD(uap->fd); |
| 1848 | if ((u_int)uap->signum > _SIG_MAXSIG) |
| 1849 | return (EINVAL); |
| 1850 | |
| 1851 | error = procdesc_find(td, uap->fd, &cap_pdkill_rights, &p); |
| 1852 | if (error) |
| 1853 | return (error); |
| 1854 | AUDIT_ARG_PROCESS(p); |
| 1855 | error = p_cansignal(td, p, uap->signum); |
| 1856 | if (error == 0 && uap->signum) |
| 1857 | kern_psignal(p, uap->signum); |
| 1858 | PROC_UNLOCK(p); |
| 1859 | return (error); |
| 1860 | } |
| 1861 | |
| 1862 | #if defined(COMPAT_43) |
| 1863 | #ifndef _SYS_SYSPROTO_H_ |
nothing calls this directly
no test coverage detected