Handbook
Glossary
kinfo_proc
Vocabulary
tools
.
ps
.
macosx
.
private
Definition
USING:
alien.c-types
classes.struct
specialized-arrays.instances.alien.c-types.char
specialized-arrays.instances.alien.c-types.int32_t
specialized-arrays.instances.alien.c-types.uint
specialized-arrays.instances.alien.c-types.void*
unix.time
unix.types
;
IN:
tools.ps.macosx.private
STRUCT:
kinfo_proc
{
kp_proc
extern_proc
initial:
S{
extern_proc
{
__p_starttime
S{
timeval
{
sec 0
}
{
usec 0
}
}
}
{
p_vmspace
f
}
{
p_sigacts
f
}
{
p_flag 0
}
{
p_stat 0
}
{
p_pid 0
}
{
p_oppid 0
}
{
p_dupfd 0
}
{
user_stack
f
}
{
exit_thread
f
}
{
p_debugger 0
}
{
sigwait 0
}
{
p_estcpu 0
}
{
p_cpticks 0
}
{
p_pctcpu 0
}
{
p_wchan
f
}
{
p_wmesg
f
}
{
p_swtime 0
}
{
p_slptime 0
}
{
p_realtimer
S{
itimerval
{
it_interval
S{
timeval
{
sec 0
}
{
usec 0
}
}
}
{
it_value
S{
timeval
{
sec 0
}
{
usec 0
}
}
}
}
}
{
p_rtime
S{
timeval
{
sec 0
}
{
usec 0
}
}
}
{
p_uticks 0
}
{
p_sticks 0
}
{
p_iticks 0
}
{
p_traceflag 0
}
{
p_tracep
f
}
{
p_siglist 0
}
{
p_textvp
f
}
{
p_holdcnt 0
}
{
p_sigmask 0
}
{
p_sigignore 0
}
{
p_sigcatch 0
}
{
p_priority 0
}
{
p_usrpri 0
}
{
p_nice 0
}
{
p_comm
char-array{
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
}
}
{
p_pgrp
f
}
{
p_addr
f
}
{
p_xstat 0
}
{
p_acflag 0
}
{
p_ru
f
}
}
}
{
e_paddr void*
}
{
e_sess void*
}
{
e_pcred
_pcred
initial:
S{
_pcred
{
pc_lock
char-array{
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
}
}
{
pc_ucred
f
}
{
p_ruid 0
}
{
p_svuid 0
}
{
p_rgid 0
}
{
p_svgid 0
}
{
p_refcnt 0
}
}
}
{
e_ucred
_ucred
initial:
S{
_ucred
{
cr_ref 0
}
{
cr_uid 0
}
{
cr_ngroups 0
}
{
cr_groups
uint-array{
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
}
}
}
}
{
e_vm
vmspace
initial:
S{
vmspace
{
dummy 0
}
{
dummy2
f
}
{
dummy3
int32_t-array{
0 0 0 0 0
}
}
{
dummy4
void*-array{
f
f
f
}
}
}
}
{
e_ppid
pid_t
initial:
0
}
{
e_pgid
pid_t
initial:
0
}
{
e_joc
short
initial:
0
}
{
e_tdev
dev_t
initial:
0
}
{
e_tpgid
pid_t
initial:
0
}
{
e_tsess void*
}
{
e_mesg char[8]
}
{
e_xsize
segsz_t
initial:
0
}
{
e_xrssize
short
initial:
0
}
{
e_xccount
short
initial:
0
}
{
e_xswrss
short
initial:
0
}
{
e_flag
int32_t
initial:
0
}
{
e_login char[12]
}
{
e_spare int32_t[4]
}
;
Methods
USING:
classes.struct
classes.struct.private
kernel
tools.ps.macosx.private
;
M:
kinfo_proc
clone
clone-underlying
\
kinfo_proc
memory>struct
;
inline
USING:
accessors
classes.struct
combinators.smart
tools.ps.macosx.private
;
M:
kinfo_proc
struct-slot-values
{
[
kp_proc>>
]
[
e_paddr>>
]
[
e_sess>>
]
[
e_pcred>>
]
[
e_ucred>>
]
[
e_vm>>
]
[
e_ppid>>
]
[
e_pgid>>
]
[
e_joc>>
]
[
e_tdev>>
]
[
e_tpgid>>
]
[
e_tsess>>
]
[
e_mesg>>
]
[
e_xsize>>
]
[
e_xrssize>>
]
[
e_xccount>>
]
[
e_xswrss>>
]
[
e_flag>>
]
[
e_login>>
]
[
e_spare>>
]
}
cleave>array
;
inline