diff options
| author | Paul Buetow <paul@buetow.org> | 2012-03-16 22:05:08 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2012-03-16 22:05:08 +0100 |
| commit | db1cdb1c45698006194c1bf545e1541f74795315 (patch) | |
| tree | 5ab4d3ba98a3b6228e2e2e035e3b12c8718154a2 | |
| parent | 5978aee6db88bfcd57abe1ce8fc5e5a2f7dd6e24 (diff) | |
bugfix only0.5.1.2
| -rw-r--r-- | CHANGELOG | 4 | ||||
| -rwxr-xr-x | loadbars | 10 |
2 files changed, 10 insertions, 4 deletions
@@ -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 @@ -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; |
