projects
/
scpubgit/System-Introspector.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
7b3254f
)
sort processes by args/pid
Robert 'phaylon' Sedlacek [Fri, 11 May 2012 17:24:03 +0000 (17:24 +0000)]
lib/System/Introspector/Processes.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/System/Introspector/Processes.pm
b/lib/System/Introspector/Processes.pm
index
9fb0726
..
4344488
100644
(file)
--- a/
lib/System/Introspector/Processes.pm
+++ b/
lib/System/Introspector/Processes.pm
@@
-58,7
+58,11
@@
sub gather {
@row{ @names } = @values;
push @rows, \%row;
}
- return { processes => \@rows };
+ return { processes => [ sort {
+ ($a->{args} cmp $b->{args})
+ ||
+ ($a->{pid} <=> $b->{pid})
+ } @rows ] };
};
}