Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_prot.c
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/loginclass.h> | #include <sys/loginclass.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/refcount.h> | #include <sys/refcount.h> | ||||
#include <sys/sx.h> | #include <sys/sx.h> | ||||
#include <sys/priv.h> | #include <sys/priv.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/sysent.h> | |||||
#include <sys/sysproto.h> | #include <sys/sysproto.h> | ||||
#include <sys/jail.h> | #include <sys/jail.h> | ||||
#include <sys/pioctl.h> | #include <sys/pioctl.h> | ||||
#include <sys/racct.h> | #include <sys/racct.h> | ||||
#include <sys/rctl.h> | #include <sys/rctl.h> | ||||
#include <sys/resourcevar.h> | #include <sys/resourcevar.h> | ||||
#include <sys/socket.h> | #include <sys/socket.h> | ||||
#include <sys/socketvar.h> | #include <sys/socketvar.h> | ||||
Show All 23 Lines | |||||
/* ARGSUSED */ | /* ARGSUSED */ | ||||
int | int | ||||
sys_getpid(struct thread *td, struct getpid_args *uap) | sys_getpid(struct thread *td, struct getpid_args *uap) | ||||
{ | { | ||||
struct proc *p = td->td_proc; | struct proc *p = td->td_proc; | ||||
td->td_retval[0] = p->p_pid; | td->td_retval[0] = p->p_pid; | ||||
#if defined(COMPAT_43) | #if defined(COMPAT_43) | ||||
if (SV_PROC_FLAG(p, SV_AOUT)) | |||||
td->td_retval[1] = kern_getppid(td); | td->td_retval[1] = kern_getppid(td); | ||||
#endif | #endif | ||||
return (0); | return (0); | ||||
} | } | ||||
#ifndef _SYS_SYSPROTO_H_ | #ifndef _SYS_SYSPROTO_H_ | ||||
struct getppid_args { | struct getppid_args { | ||||
int dummy; | int dummy; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 2,166 Lines • Show Last 20 Lines |