|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include "opt_compat.h"#include "opt_kdtrace.h"#include "opt_ktrace.h"#include "opt_procdesc.h"#include <sys/param.h>#include <sys/systm.h>#include <sys/sysproto.h>#include <sys/capability.h>#include <sys/eventhandler.h>#include <sys/kernel.h>#include <sys/malloc.h>#include <sys/lock.h>#include <sys/mutex.h>#include <sys/proc.h>#include <sys/procdesc.h>#include <sys/pioctl.h>#include <sys/jail.h>#include <sys/tty.h>#include <sys/wait.h>#include <sys/vmmeter.h>#include <sys/vnode.h>#include <sys/racct.h>#include <sys/resourcevar.h>#include <sys/sbuf.h>#include <sys/signalvar.h>#include <sys/sched.h>#include <sys/sx.h>#include <sys/syscallsubr.h>#include <sys/syslog.h>#include <sys/ptrace.h>#include <sys/acct.h>#include <sys/filedesc.h>#include <sys/sdt.h>#include <sys/shm.h>#include <sys/sem.h>#include <security/audit/audit.h>#include <security/mac/mac_framework.h>#include <vm/vm.h>#include <vm/vm_extern.h>#include <vm/vm_param.h>#include <vm/pmap.h>#include <vm/vm_map.h>#include <vm/vm_page.h>#include <vm/uma.h>
Go to the source code of this file.
Data Structures | |
| struct | abort2_args |
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| SDT_PROVIDER_DECLARE (proc) | |
| SDT_PROBE_DEFINE1 (proc, kernel,, exit,"int") | |
| struct proc * | proc_realparent (struct proc *child) |
| static void | clear_orphan (struct proc *p) |
| void | sys_sys_exit (struct thread *td, struct sys_exit_args *uap) |
| void | exit1 (struct thread *td, int rv) |
| int | sys_abort2 (struct thread *td, struct abort2_args *uap) |
| int | sys_wait4 (struct thread *td, struct wait4_args *uap) |
| int | sys_wait6 (struct thread *td, struct wait6_args *uap) |
| void | proc_reap (struct thread *td, struct proc *p, int *status, int options) |
| static int | proc_to_reap (struct thread *td, struct proc *p, idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo, int check_only) |
| int | kern_wait (struct thread *td, pid_t pid, int *status, int options, struct rusage *rusage) |
| int | kern_wait6 (struct thread *td, idtype_t idtype, id_t id, int *status, int options, struct __wrusage *wrusage, siginfo_t *siginfo) |
| void | proc_reparent (struct proc *child, struct proc *parent) |
Variables | |
| void(* | nlminfo_release_p )(struct proc *p) |
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 129 of file kern_exit.c.
References proctree_lock.
Referenced by exit1(), proc_reap(), and proc_reparent().

| void exit1 | ( | struct thread * | td, |
| int | rv | ||
| ) |
Definition at line 163 of file kern_exit.c.
References acct_process(), allproc_lock, childproc_exited(), clear_orphan(), fdfree(), fixjobc(), funsetownlst(), Giant, initproc, kern_psignal(), knlist_destroy(), lim_free(), nlminfo_release_p, panic(), ppeers_lock, printf(), prison_proc_free(), proc_realparent(), proc_reparent(), proctree_lock, racct_sub(), rebooting, ruadd(), sched_exit(), sigqueue_flush(), stopprofclock(), thread_exit(), thread_single(), thread_suspend_check(), tidhash_remove(), tty_signal_pgrp(), vrele(), wakeup(), and zombproc.
Referenced by do_execve(), kproc_exit(), sigexit(), sys_abort2(), and sys_sys_exit().


| int kern_wait | ( | struct thread * | td, |
| pid_t | pid, | ||
| int * | status, | ||
| int | options, | ||
| struct rusage * | rusage | ||
| ) |
Definition at line 1081 of file kern_exit.c.
References kern_wait6().
Referenced by sys_wait4().


| int kern_wait6 | ( | struct thread * | td, |
| idtype_t | idtype, | ||
| id_t | id, | ||
| int * | status, | ||
| int | options, | ||
| struct __wrusage * | wrusage, | ||
| siginfo_t * | siginfo | ||
| ) |
Definition at line 1122 of file kern_exit.c.
References proc_to_reap(), proctree_lock, and sigqueue_take().
Referenced by kern_wait(), and sys_wait6().


| struct proc* proc_realparent | ( | struct proc * | child | ) |
Definition at line 103 of file kern_exit.c.
References initproc, parent, and proctree_lock.
Referenced by exit1(), inferior(), kern_ptrace(), and proc_reap().

| void proc_reap | ( | struct thread * | td, |
| struct proc * | p, | ||
| int * | status, | ||
| int | options | ||
| ) |
Definition at line 800 of file kern_exit.c.
References allproc_lock, chgproccnt(), clear_orphan(), crfree(), leavepgrp(), nprocs, pargs_drop(), pksignal(), proc_realparent(), proc_reparent(), proc_zone, proctree_lock, racct_proc_exit(), racct_sub(), ruadd(), sigacts_free(), sigqueue_take(), thread_wait(), and wakeup().
Referenced by proc_to_reap().


| void proc_reparent | ( | struct proc * | child, |
| struct proc * | parent | ||
| ) |
Definition at line 1306 of file kern_exit.c.
References clear_orphan(), parent, proctree_lock, and sigqueue_take().
Referenced by exit1(), fork_return(), kern_ptrace(), kproc_exit(), and proc_reap().


|
static |
Definition at line 930 of file kern_exit.c.
References calccru(), calcru(), p_canwait(), proc_reap(), and proctree_lock.
Referenced by kern_wait6().


| SDT_PROBE_DEFINE1 | ( | proc | , |
| kernel | , | ||
| exit | , | ||
| "int" | |||
| ) |
| SDT_PROVIDER_DECLARE | ( | proc | ) |
| int sys_abort2 | ( | struct thread * | td, |
| struct abort2_args * | uap | ||
| ) |
Definition at line 651 of file kern_exit.c.
References abort2_args::args, exit1(), log(), abort2_args::nargs, sbuf_cat(), sbuf_clear(), sbuf_copyin(), sbuf_data(), sbuf_delete(), sbuf_finish(), sbuf_new(), sbuf_printf(), sbuf_trim(), and abort2_args::why.

| void sys_sys_exit | ( | struct thread * | td, |
| struct sys_exit_args * | uap | ||
| ) |
Definition at line 150 of file kern_exit.c.
References exit1().

| int sys_wait4 | ( | struct thread * | td, |
| struct wait4_args * | uap | ||
| ) |
Definition at line 739 of file kern_exit.c.
References kern_wait().

| int sys_wait6 | ( | struct thread * | td, |
| struct wait6_args * | uap | ||
| ) |
Definition at line 757 of file kern_exit.c.
References kern_wait6().

| void(* nlminfo_release_p) (struct proc *p) |
Definition at line 100 of file kern_exit.c.
Referenced by exit1().