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
7dd971e3
Commit
7dd971e3
authored
7 years ago
by
Hisham Muhammad
Browse files
Options
Download
Email Patches
Plain Diff
Linux: fix thread flags
parent
3449cf33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux/LinuxProcess.c
+1
-1
linux/LinuxProcess.c
with
1 addition
and
1 deletion
+1
-1
linux/LinuxProcess.c
View file @
7dd971e3
...
...
@@ -936,6 +936,7 @@ bool Process_update(Process* proc, bool isNew, ProcessList* pl, ProcessScanData*
proc
->
percent_mem
=
(
proc
->
m_resident
*
PAGE_SIZE_KB
)
/
(
double
)(
pl
->
totalMem
)
*
100
.
0
;
if
(
isNew
)
{
proc
->
tgid
=
lpsd
->
mainProcess
?
lpsd
->
mainProcess
:
proc
->
pid
;
proc
->
threadFlags
=
((
proc
->
pgrp
==
0
)
?
PROCESS_KERNEL_THREAD
:
0
)
|
((
proc
->
pid
!=
proc
->
tgid
)
?
PROCESS_USERLAND_THREAD
:
0
);
...
...
@@ -955,7 +956,6 @@ bool Process_update(Process* proc, bool isNew, ProcessList* pl, ProcessScanData*
if
(
!
LinuxProcess_readCmdlineFile
(
proc
,
dirname
,
name
))
{
return
false
;
}
proc
->
tgid
=
lpsd
->
mainProcess
?
lpsd
->
mainProcess
:
proc
->
pid
;
}
else
{
if
(
settings
->
updateProcessNames
&&
proc
->
state
!=
'Z'
)
{
if
(
!
LinuxProcess_readCmdlineFile
(
proc
,
dirname
,
name
))
{
...
...
This diff is collapsed.
Click to expand it.
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