| www.delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| X-BigFish: | V |
| MIME-Version: | 1.0 |
| Subject: | Perl NET::SERVER module acts strangly in cygwin |
| Date: | Thu, 23 Feb 2006 21:08:55 -0800 |
| Message-ID: | <B7392353E4C4DE4ABC4EC255DB4CA04003471396@EXCHVS1.spimageworks.com> |
| From: | "Bruce Dobrin" <dobrin AT imageworks DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id k1O58t7C026677 |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |