File tree Expand file tree Collapse file tree 1 file changed +0
-40
lines changed Expand file tree Collapse file tree 1 file changed +0
-40
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package Cluster;
3
3
use strict;
4
4
use warnings;
5
5
6
- use Proc::ProcessTable;
7
6
use PostgresNode;
8
7
use TestLib;
9
8
use Test::More;
@@ -166,45 +165,6 @@ sub stopid
166
165
return stopnode($self -> {nodes }-> [$idx ]);
167
166
}
168
167
169
- sub killtree
170
- {
171
- my $root = shift ;
172
- diag(" killtree $root \n " );
173
-
174
- my $t = new Proc::ProcessTable;
175
-
176
- my %parent = ();
177
- # my %cmd = ();
178
- foreach my $p (@{$t -> table}) {
179
- $parent {$p -> pid} = $p -> ppid;
180
- # $cmd{$p->pid} = $p->cmndline;
181
- }
182
-
183
- if (!defined $root ) {
184
- return ;
185
- }
186
- my @queue = ($root );
187
- my @killist = ();
188
-
189
- while (scalar @queue ) {
190
- my $victim = shift @queue ;
191
- while (my ($pid , $ppid ) = each %parent ) {
192
- if ($ppid == $victim ) {
193
- push @queue , $pid ;
194
- }
195
- }
196
- diag(" SIGSTOP to $victim " );
197
- kill ' STOP' , $victim ;
198
- unshift @killist , $victim ;
199
- }
200
-
201
- diag(" SIGKILL to " . join (' ' , @killist ));
202
- kill ' KILL' , @killist ;
203
- # foreach my $victim (@killist) {
204
- # print("kill $victim " . $cmd{$victim} . "\n");
205
- # }
206
- }
207
-
208
168
sub stop
209
169
{
210
170
my ($self , $mode ) = @_ ;
You can’t perform that action at this time.
0 commit comments