diff options
| -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; |
