This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Perl NET::SERVER module acts strangly in cygwin
- From: "Bruce Dobrin" <dobrin at imageworks dot com>
- To: <cygwin at cygwin dot com>
- Date: Thu, 23 Feb 2006 21:08:55 -0800
- Subject: Perl NET::SERVER module acts strangly in cygwin
HI All,
Perhaps this is the wrong list for this, but as it is Cygwin
specific...
Anyone have any experience with the perl NET::SERVER module?
I have been re-writing some of my perl servers using the
NET::SERVER::PREFORK (v.90)module. 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;
print "unix style destination is $destinU \r\n";
if (! -d "$destinU" ){
print "system \"mkdir -p ${destinU}\"\r\n";
system "mkdir -p /cygdrive/c/${destinU}" ;
Result:
unix style destination is c/temp/newdir
mkdir -p /cygdrive/c/temp/newdir
#####And nothing happens and client session crashes.
If I set the above second line to :
my $destinU = c:\temp\newdir ;
I get :
unix style destination is c/temp/newdir
mkdir -p /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 and I get weird /cygdrive/c/temp directorys ;)
I tried running the above example in a script using the SOCKET module,
and the above worked as expected .
I've been staring at strace logs, but I'm not getting anywhere...
Any help or suggestions would be appreciated
Bruce D.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/