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
1c0e93c1
Commit
1c0e93c1
authored
Jan 14, 2014
by
Hisham Muhammad
Browse files
First new feature of the git era! "c" key tags all children of a process.
parent
cd692f27
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
1c0e93c1
What's new in version 1.0.3
* Tag all children ('c' key)
* Fixes in accounting of guest time when using virtualization
(thanks to Patrick Marlier)
* Performance improvements
...
...
htop.c
View file @
1c0e93c1
...
...
@@ -272,6 +272,17 @@ static const char* getMainPanelValue(Panel* panel, int i) {
return
""
;
}
static
void
tagAllChildren
(
Panel
*
panel
,
Process
*
parent
)
{
parent
->
tag
=
true
;
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
)
{
tagAllChildren
(
panel
,
p
);
}
}
}
int
main
(
int
argc
,
char
**
argv
)
{
int
delay
=
-
1
;
...
...
@@ -563,6 +574,13 @@ int main(int argc, char** argv) {
setSortKey
(
pl
,
TIME
,
panel
,
settings
);
break
;
}
case
'c'
:
{
Process
*
p
=
(
Process
*
)
Panel_getSelected
(
panel
);
if
(
!
p
)
break
;
tagAllChildren
(
panel
,
p
);
break
;
}
case
'U'
:
{
for
(
int
i
=
0
;
i
<
Panel_size
(
panel
);
i
++
)
{
...
...
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