Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit38f35b9

Browse files
committed
Delete killtree method in Cluster.pm as it depends on Proc::ProcessTable and isn't actually used anywhere
1 parent3eac816 commit38f35b9

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

‎Cluster.pm

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package Cluster;
33
use strict;
44
use warnings;
55

6-
use Proc::ProcessTable;
76
use PostgresNode;
87
use TestLib;
98
use Test::More;
@@ -166,45 +165,6 @@ sub stopid
166165
return stopnode($self->{nodes}->[$idx]);
167166
}
168167

169-
subkilltree
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-
foreachmy$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-
208168
substop
209169
{
210170
my ($self,$mode) =@_;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp