summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2012-03-16 22:05:08 +0100
committerPaul Buetow <paul@buetow.org>2012-03-16 22:05:08 +0100
commitdb1cdb1c45698006194c1bf545e1541f74795315 (patch)
tree5ab4d3ba98a3b6228e2e2e035e3b12c8718154a2
parent5978aee6db88bfcd57abe1ce8fc5e5a2f7dd6e24 (diff)
bugfix only0.5.1.2
-rw-r--r--CHANGELOG4
-rwxr-xr-xloadbars10
2 files changed, 10 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 2f49a68..49bec47 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Fri Mar 16 22:03:18 CET 2012
+* Release v0.5.1.2
+* Bugfix only release
+
Fri Mar 16 07:20:50 CET 2012
* Release v0.5.1.1
* Dropped FreeBSD support / focus is Linux
diff --git a/loadbars b/loadbars
index ff7e1b7..78cceba 100755
--- a/loadbars
+++ b/loadbars
@@ -28,7 +28,7 @@ use threads;
use threads::shared;
use constant {
- VERSION => 'loadbars v0.5.1.1-master',
+ VERSION => 'loadbars v0.5.1.2',
COPYRIGHT => '2010-2012 (c) Paul Buetow <loadbars@mx.buetow.org>',
CONFFILE => $ENV{HOME} . '/.loadbarsrc',
CSSH_CONFFILE => '/etc/clusters',
@@ -59,7 +59,7 @@ use constant {
$| = 1;
-my @PIDS : shared;
+my %PIDS : shared;
my %AVGSTATS : shared;
my %CPUSTATS : shared;
my %MEMSTATS : shared;
@@ -200,7 +200,7 @@ sub terminate_pids (@) {
display_info 'Terminating sub-processes, hasta la vista!';
$_->kill('TERM') for @threads;
display_info_no_nl 'Terminating PIDs';
- for my $pid (@PIDS) {
+ for my $pid (keys %PIDS) {
my $proc_table = Proc::ProcessTable->new();
for my $proc (@{$proc_table->table()}) {
if ($proc->ppid == $pid) {
@@ -252,7 +252,7 @@ BASH
next;
};
- push @PIDS, $pid;
+ $PIDS{$pid} = 1;
# Toggle CPUs
$SIG{USR1} = sub { $sigusr1 = 1 };
@@ -303,6 +303,8 @@ BASH
last;
}
}
+
+ delete $PIDS{$pid};
}
return undef;