Subject: | "system" does not act upon Port data successfully in Cygwin |
In NET::SERVER::PREFORK (v.90)module. On WinXP/ Cygwin1.5.18. Perl,
v5.8.7 built for cygwin-thread-multi-64int. All is well on Linux but in
Cygwin (1.5.18) everything works fine until I try to take the data
coming in via the socket ($_) and fork off a "system" or "exec" using
that data. When I do this, the client connection is abruptly closed
without successfully performing the "system" call. If I define the
variable internally it all works fine.
Example:
Sub make_dirs (
my $destinU = $_ ;
chomp;
$destinU =~ tr#\\#/#;
$destinU =~ tr/://d;
#####
# my $destinUnx = "/cygdrive/c/temp/newdir";
my $destinUnx = "/cygdrive/$destinU";
#####
if (! -d "$destinU" ){
print "Unix style path is $destinUnx\r\n";
system "mkdir -p ${destinUnx}" ;
}
}
Result:
when c:\temp\newdir is sent in I get:
Unix style path is /cygdrive/c/temp/newdir
#####And nothing happens and client session crashes.
When I reverse the commented lines
I get :
Unix style path is /cygdrive/c/temp/newdir
##### the directory is created and the client session remains open and
stable.
If I run the first example on Linux (centos4) All works as it's suppose
to.
I tried running the above example in a script using the SOCKET module,
and the above worked as expected .
Subject: | working_strace |
Message body not shown because it is not plain text.
Subject: | notworking_strace |
Message body not shown because it is not plain text.