MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sys_pdkill

Function sys_pdkill

freebsd/kern/kern_sig.c:1840–1860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1838}
1839
1840int
1841sys_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_

Callers

nothing calls this directly

Calls 3

procdesc_findFunction · 0.85
p_cansignalFunction · 0.85
kern_psignalFunction · 0.85

Tested by

no test coverage detected