Subject: | patch: Partial support for Win32; test hangs |
It is 'tracert' under Win32.
'-n' should be replaced with '-d'
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/tracert.mspx?mfr=true
In tests tracert to localhost fails, although it return correct results
when I'm starting it manually at command prompt. tracert to remote host
hangs.
$self->_text_accumulator() is empty after execution.
-------
Alexandr Ciornii, http://chorny.net
Subject: | Traceroute.pm |
Message body is not shown because it is too large.
Subject: | Traceroute.pm.patch |
*** Traceroute.pm.dist Sat Sep 2 22:15:23 2006
--- Traceroute.pm Sat Sep 2 22:13:55 2006
***************
*** 176,182 ****
# Initialize debug if it isn't already.
$self->debug(0) if(!defined($self->debug));
! $self->trace_program("traceroute") if(!defined($self->trace_program));
$self->debug_print(1, "Running in debug mode\n");
--- 176,188 ----
# Initialize debug if it isn't already.
$self->debug(0) if(!defined($self->debug));
! if(!defined($self->trace_program)) {
! if ($^O eq 'MSWin32') {
! $self->trace_program("tracert") ;
! } else {
! $self->trace_program("traceroute") ;
! }
! }
$self->debug_print(1, "Running in debug mode\n");
***************
*** 401,407 ****
# XXX we probably shouldn't throw stderr away.
# XXX we probably shouldn't use named filehandles.
open(SAVESTDERR, ">&STDERR");
! open(STDERR, ">/dev/null");
my $pipe = new IO::Pipe;
--- 407,414 ----
# XXX we probably shouldn't throw stderr away.
# XXX we probably shouldn't use named filehandles.
open(SAVESTDERR, ">&STDERR");
! use File::Spec;
! open(STDERR, ">".File::Spec->devnull());
my $pipe = new IO::Pipe;
***************
*** 446,452 ****
my @result;
! push(@result, "-n");
my($key, $flag);
--- 453,463 ----
my @result;
! if ($^O eq 'MSWin32') {
! push(@result, "-d");
! } else {
! push(@result, "-n");
! }
my($key, $flag);