Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
d4a8023b
Commit
d4a8023b
authored
Aug 30, 2016
by
Hisham
Browse files
Fix typos, by @Gelma.
Closes #546.
parent
cceab15b
Changes
2
Hide whitespace changes
Inline
Side-by-side
freebsd/FreeBSDProcessList.c
View file @
d4a8023b
...
...
@@ -151,10 +151,10 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
fpl
->
cp_time_n
=
xCalloc
(
cpus
,
sizeof_cp_time_array
);
len
=
sizeof_cp_time_array
;
// fetch intial single (or average) CPU clicks from kernel
// fetch in
i
tial single (or average) CPU clicks from kernel
sysctl
(
MIB_kern_cp_time
,
2
,
fpl
->
cp_time_o
,
&
len
,
NULL
,
0
);
// on smp box, fetch rest of intial CPU's clicks
// on smp box, fetch rest of in
i
tial CPU's clicks
if
(
cpus
>
1
)
{
len
=
2
;
sysctlnametomib
(
"kern.cp_times"
,
MIB_kern_cp_times
,
&
len
);
fpl
->
cp_times_o
=
xCalloc
(
cpus
,
sizeof_cp_time_array
);
...
...
@@ -175,7 +175,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
len
=
sizeof
(
kernelFScale
);
if
(
sysctlbyname
(
"kern.fscale"
,
&
kernelFScale
,
&
len
,
NULL
,
0
)
==
-
1
)
{
//sane default for kernel provded CPU p
r
ecentage scaling, at least on x86 machines, in case this sysctl call failed
//sane default for kernel prov
i
ded CPU pe
r
centage scaling, at least on x86 machines, in case this sysctl call failed
kernelFScale
=
2048
;
}
...
...
@@ -459,17 +459,17 @@ void ProcessList_goThroughEntries(ProcessList* this) {
fp
->
jname
=
FreeBSDProcessList_readJailName
(
kproc
);
}
else
{
if
(
fp
->
jid
!=
kproc
->
ki_jid
)
{
// proces can enter jail anytime
// proces
s
can enter jail anytime
fp
->
jid
=
kproc
->
ki_jid
;
free
(
fp
->
jname
);
fp
->
jname
=
FreeBSDProcessList_readJailName
(
kproc
);
}
if
(
proc
->
ppid
!=
kproc
->
ki_ppid
)
{
// if there are reapers in the system, proces can get reparented anytime
// if there are reapers in the system, proces
s
can get reparented anytime
proc
->
ppid
=
kproc
->
ki_ppid
;
}
if
(
proc
->
st_uid
!=
kproc
->
ki_uid
)
{
// some proceses change users (eg. to lower privs)
// some proces
s
es change users (eg. to lower privs)
proc
->
st_uid
=
kproc
->
ki_uid
;
proc
->
user
=
UsersTable_getRef
(
this
->
usersTable
,
proc
->
st_uid
);
}
...
...
test_spec.lua
View file @
d4a8023b
...
...
@@ -36,7 +36,7 @@ os.execute("cp ./default.htoprc ./test.htoprc")
rt
:
forkPty
(
"LC_ALL=C HTOPRC=./test.htoprc ./htop 2> htop-valgrind.txt"
)
local
stdscr
,
term_win
-- Curses initalization needed even when not in visual mode
-- Curses init
i
alization needed even when not in visual mode
-- because luaposix only initializes KEY_* constants after initscr().
stdscr
=
curses
.
initscr
()
if
visual
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment