* Kill the current process for stated reason. */
| 3255 | * Kill the current process for stated reason. |
| 3256 | */ |
| 3257 | void |
| 3258 | killproc(struct proc *p, const char *why) |
| 3259 | { |
| 3260 | |
| 3261 | PROC_LOCK_ASSERT(p, MA_OWNED); |
| 3262 | CTR3(KTR_PROC, "killproc: proc %p (pid %d, %s)", p, p->p_pid, |
| 3263 | p->p_comm); |
| 3264 | log(LOG_ERR, "pid %d (%s), jid %d, uid %d, was killed: %s\n", |
| 3265 | p->p_pid, p->p_comm, p->p_ucred->cr_prison->pr_id, |
| 3266 | p->p_ucred->cr_uid, why); |
| 3267 | proc_wkilled(p); |
| 3268 | kern_psignal(p, SIGKILL); |
| 3269 | } |
| 3270 | |
| 3271 | /* |
| 3272 | * Force the current process to exit with the specified signal, dumping core |
no test coverage detected