X-Spam-Check-By: sourceware.org X-BigFish: V Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: Perl NET::SERVER module acts strangly in cygwin Date: Thu, 23 Feb 2006 21:08:55 -0800 Message-ID: From: "Bruce Dobrin" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit 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/