diff options
Diffstat (limited to 'ACE/bin/PerlACE/Process_Unix.pm')
-rw-r--r-- | ACE/bin/PerlACE/Process_Unix.pm | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/ACE/bin/PerlACE/Process_Unix.pm b/ACE/bin/PerlACE/Process_Unix.pm index e1ddb7f8fde..d08da933761 100644 --- a/ACE/bin/PerlACE/Process_Unix.pm +++ b/ACE/bin/PerlACE/Process_Unix.pm @@ -533,42 +533,4 @@ sub TimedWait ($) return -1; } -### - -sub kill_all ($) -{ - my $procmask = shift; - my $pid = -1; - my $first = 1; - my $ps_cmd = 'ps xw'; - my $ps_file = `which ps`; - if ((-l $ps_file) and (readlink ($ps_file)) =~ /busybox/) { - ## some embedded targets use BusyBox for base tools - ## with different arguments - $ps_cmd = 'ps w'; - } - if (defined $ENV{'PS_CMD'}) { - ## in case a special command is required - $ps_cmd = $ENV{'PS_CMD'}; - } - for my $line (`$ps_cmd`) { - if ($first) { - # skip first line (headers) - $first = 0; - } else { - # find matching process line - if ($line =~ /$procmask/) { - # find process PID - if ($line =~ /^\s*(\d+)\s+/) { - $pid = $1; - kill ('KILL', $pid); # kill process - if (defined $ENV{'ACE_TEST_VERBOSE'}) { - print STDERR "INFO: Killed process at [$line]\n"; - } - } - } - } - } -} - 1; |