Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
e3f65c8e
Commit
e3f65c8e
authored
7 years ago
by
Hisham Muhammad
Browse files
Options
Download
Email Patches
Plain Diff
Make 'c' key work with threads as well.
parent
b9934ffa
master
lua
next
perfcounters
pkgconfig-on-linux
solaris
3.0.0beta5
3.0.0beta4
3.0.0beta3
3.0.0beta2
3.0.0beta1
2.2.0
2.1.0
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Action.c
+1
-1
Action.c
Process.c
+2
-0
Process.c
Process.h
+2
-0
Process.h
ProcessList.c
+1
-1
ProcessList.c
with
6 additions
and
2 deletions
+6
-2
Action.c
View file @
e3f65c8e
...
...
@@ -142,7 +142,7 @@ static void tagAllChildren(Panel* panel, Process* parent) {
pid_t
ppid
=
parent
->
pid
;
for
(
int
i
=
0
;
i
<
Panel_size
(
panel
);
i
++
)
{
Process
*
p
=
(
Process
*
)
Panel_get
(
panel
,
i
);
if
(
!
p
->
tag
&&
p
->
ppid
==
ppid
)
{
if
(
!
p
->
tag
&&
Process_isChildOf
(
p
,
ppid
)
)
{
tagAllChildren
(
panel
,
p
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Process.c
View file @
e3f65c8e
...
...
@@ -172,6 +172,8 @@ typedef struct ProcessClass_ {
#define As_Process(this_) ((ProcessClass*)((this_)->super.klass))
#define Process_isChildOf(process_, pid_) (process_->tgid == pid_ || (process_->tgid == process_->pid && process_->ppid == pid_))
}*/
static
int
Process_getuid
=
-
1
;
...
...
This diff is collapsed.
Click to expand it.
Process.h
View file @
e3f65c8e
...
...
@@ -151,6 +151,8 @@ typedef struct ProcessClass_ {
#define As_Process(this_) ((ProcessClass*)((this_)->super.klass))
#define Process_isChildOf(process_, pid_) (process_->tgid == pid_ || (process_->tgid == process_->pid && process_->ppid == pid_))
#define ONE_K 1024L
#define ONE_M (ONE_K * ONE_K)
...
...
This diff is collapsed.
Click to expand it.
ProcessList.c
View file @
e3f65c8e
...
...
@@ -173,7 +173,7 @@ static void ProcessList_buildTree(ProcessList* this, pid_t pid, int level, int i
for
(
int
i
=
Vector_size
(
this
->
processes
)
-
1
;
i
>=
0
;
i
--
)
{
Process
*
process
=
(
Process
*
)
(
Vector_get
(
this
->
processes
,
i
));
if
(
process
->
show
&&
(
p
rocess
->
tgid
==
pid
||
(
process
->
tgid
==
process
->
pid
&&
process
->
ppid
==
pid
))
)
{
if
(
process
->
show
&&
P
rocess
_isChildOf
(
process
,
pid
))
{
process
=
(
Process
*
)
(
Vector_take
(
this
->
processes
,
i
));
Vector_add
(
children
,
process
);
}
...
...
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
Menu
Projects
Groups
Snippets
Help