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
e906c0dd
Commit
e906c0dd
authored
Oct 07, 2015
by
Hisham Muhammad
Browse files
Merge pull request #287 from etosan/master
PPID and JID update fix
parents
cc0fc365
93f05b45
Changes
2
Show whitespace changes
Inline
Side-by-side
freebsd/FreeBSDProcessList.c
View file @
e906c0dd
...
@@ -199,6 +199,7 @@ void ProcessList_goThroughEntries(ProcessList* this) {
...
@@ -199,6 +199,7 @@ void ProcessList_goThroughEntries(ProcessList* this) {
proc
->
show
=
!
((
hideKernelThreads
&&
Process_isKernelThread
(
fp
))
||
(
hideUserlandThreads
&&
Process_isUserlandThread
(
proc
)));
proc
->
show
=
!
((
hideKernelThreads
&&
Process_isKernelThread
(
fp
))
||
(
hideUserlandThreads
&&
Process_isUserlandThread
(
proc
)));
if
(
!
preExisting
)
{
if
(
!
preExisting
)
{
fp
->
jid
=
kproc
->
ki_jid
;
fp
->
jid
=
kproc
->
ki_jid
;
proc
->
pid
=
kproc
->
ki_pid
;
proc
->
pid
=
kproc
->
ki_pid
;
...
@@ -206,7 +207,6 @@ void ProcessList_goThroughEntries(ProcessList* this) {
...
@@ -206,7 +207,6 @@ void ProcessList_goThroughEntries(ProcessList* this) {
fp
->
kernel
=
1
;
fp
->
kernel
=
1
;
else
else
fp
->
kernel
=
0
;
fp
->
kernel
=
0
;
proc
->
ppid
=
kproc
->
ki_ppid
;
proc
->
tpgid
=
kproc
->
ki_tpgid
;
proc
->
tpgid
=
kproc
->
ki_tpgid
;
proc
->
tgid
=
kproc
->
ki_pid
;
proc
->
tgid
=
kproc
->
ki_pid
;
proc
->
session
=
kproc
->
ki_sid
;
proc
->
session
=
kproc
->
ki_sid
;
...
@@ -219,12 +219,19 @@ void ProcessList_goThroughEntries(ProcessList* this) {
...
@@ -219,12 +219,19 @@ void ProcessList_goThroughEntries(ProcessList* this) {
proc
->
comm
=
FreeBSDProcessList_readProcessName
(
fpl
->
kd
,
kproc
,
&
proc
->
basenameOffset
);
proc
->
comm
=
FreeBSDProcessList_readProcessName
(
fpl
->
kd
,
kproc
,
&
proc
->
basenameOffset
);
fp
->
jname
=
FreeBSDProcessList_readJailName
(
kproc
);
fp
->
jname
=
FreeBSDProcessList_readJailName
(
kproc
);
}
else
{
}
else
{
if
(
fp
->
jid
!=
kproc
->
ki_jid
)
{
fp
->
jid
=
kproc
->
ki_jid
;
free
(
fp
->
jname
);
fp
->
jname
=
FreeBSDProcessList_readJailName
(
kproc
);
}
if
(
settings
->
updateProcessNames
)
{
if
(
settings
->
updateProcessNames
)
{
free
(
proc
->
comm
);
free
(
proc
->
comm
);
proc
->
comm
=
FreeBSDProcessList_readProcessName
(
fpl
->
kd
,
kproc
,
&
proc
->
basenameOffset
);
proc
->
comm
=
FreeBSDProcessList_readProcessName
(
fpl
->
kd
,
kproc
,
&
proc
->
basenameOffset
);
}
}
}
}
proc
->
ppid
=
kproc
->
ki_ppid
;
proc
->
m_size
=
kproc
->
ki_size
/
pageSizeKb
/
1000
;
proc
->
m_size
=
kproc
->
ki_size
/
pageSizeKb
/
1000
;
proc
->
m_resident
=
kproc
->
ki_rssize
;
// * pageSizeKb;
proc
->
m_resident
=
kproc
->
ki_rssize
;
// * pageSizeKb;
proc
->
nlwp
=
kproc
->
ki_numthreads
;
proc
->
nlwp
=
kproc
->
ki_numthreads
;
...
...
linux/Platform.c
View file @
e906c0dd
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