summaryrefslogtreecommitdiffstats
path: root/qooxdoo/source/perl
diff options
context:
space:
mode:
Diffstat (limited to 'qooxdoo/source/perl')
-rw-r--r--qooxdoo/source/perl/Qooxdoo/Services/Tr.pm (renamed from qooxdoo/source/perl/Qooxdoo/Services/Mtr.pm)22
1 files changed, 11 insertions, 11 deletions
diff --git a/qooxdoo/source/perl/Qooxdoo/Services/Mtr.pm b/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm
index 6c04778..58195eb 100644
--- a/qooxdoo/source/perl/Qooxdoo/Services/Mtr.pm
+++ b/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm
@@ -1,4 +1,4 @@
-package Qooxdoo::Services::Mtr;
+package Qooxdoo::Services::Tr;
use strict;
use POSIX qw(setsid :sys_wait_h);
use Time::HiRes qw(usleep);
@@ -14,16 +14,16 @@ sub launch {
my $host = shift;
defined(my $pid = fork) or do { $error->set_error(101,"Can't fork: $!");return $error};
if ($pid){
- open my $x, ">/tmp/mtr_session.$pid" or do {
- $error->set_error(199,"Opening /tmp/mtr_session.$$: $!");
+ open my $x, ">/tmp/tr_session.$pid" or do {
+ $error->set_error(199,"Opening /tmp/tr_session.$$: $!");
return $error;
};
close ($x);
return $pid;
}
chdir '/' or die "Can't chdir to /: $!";
- open STDOUT, ">>/tmp/mtr_session.$$"
- or die "Can't write to /tmp/mtr_session.$$: $!";
+ open STDOUT, ">>/tmp/tr_session.$$"
+ or die "Can't write to /tmp/tr_session.$$: $!";
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
setsid or die "Can't start a new session: $!";
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!";
@@ -46,19 +46,19 @@ sub get_number {
}
}
-sub method_stop_mtr {
+sub method_stop_tr {
my $error = shift;
my $arg = shift;
my $handle = get_number($error,$arg);
return $handle if ref $handle;
- my $data = "/tmp/mtr_session.".$handle;
+ my $data = "/tmp/tr_session.".$handle;
if (-r $data){
warn "Sending kill $handle";
kill('KILL',$handle);
}
}
-sub method_run_mtr
+sub method_run_tr
{
my $error = shift;
my $arg = shift;
@@ -74,14 +74,14 @@ sub method_run_mtr
}
return $point if ref $point;
return $handle if ref $handle;
- my $data = "/tmp/mtr_session.".$handle;
+ my $data = "/tmp/tr_session.".$handle;
if (open my $fh,$data){
my $again;
my $size;
my $rounds = 0;
do {
$size = -s $fh;
- # make sure we reap any zombi instances of mtr
+ # make sure we reap any zombi instances of tr
# this is especially important when running with speedy of fastcgi
waitpid($handle,WNOHANG);
$again = kill(0, $handle);
@@ -124,7 +124,7 @@ sub method_run_mtr
}
}
else {
- $error->set_error(102,"Seeking in mtr output to $point: $!");
+ $error->set_error(102,"Seeking in traceroute output to $point: $!");
return $error;
}
}