[padb] r357 committed - Fix to the proc-format mode, ensure that the information we report...
padb at googlecode.com
padb at googlecode.com
Wed Dec 9 18:44:34 GMT 2009
Revision: 357
Author: apittman
Date: Wed Dec 9 10:43:32 2009
Log: Fix to the proc-format mode, ensure that the information we report
comes from the lead pid in the process group.
http://code.google.com/p/padb/source/detail?r=357
Modified:
/trunk/src/padb
=======================================
--- /trunk/src/padb Wed Dec 9 09:51:13 2009
+++ /trunk/src/padb Wed Dec 9 10:43:32 2009
@@ -7642,16 +7642,19 @@
if ( -d "/proc/$pid/task" and $carg->{proc_shows_proc} ) {
- my $threads = 0;
-
# 2.6 kernel. (ntpl)
my @tasks = slurp_dir("/proc/$pid/task");
foreach my $task (@tasks) {
next if ( $task eq '.' );
next if ( $task eq '..' );
show_task_dir( $carg, $vp, $pid, "/proc/$pid/task/$task" );
- $threads++;
- }
+ if ( defined $carg->{proc_format} ) {
+ last;
+ }
+ }
+
+ # We have to deduct 2 here to account for . and ..
+ my $threads = @tasks - 2;
proc_output( $vp, 'threads', $threads );
} else {
show_task_dir( $carg, $vp, $pid, "/proc/$pid" );
More information about the padb-devel
mailing list