Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Fri, 22 Jun 2001 20:05:18 -0400 (EDT) From: Brian Jepson X-Sender: bjepson AT sol DOT east DOT ora DOT com To: cygwin AT cygwin DOT com Subject: Re: 1.3.2: Perl script called via system() uses Windows filenames In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-851401618-993254718=:26353" ---559023410-851401618-993254718=:26353 Content-Type: TEXT/PLAIN; charset=US-ASCII The attached patch (against perl-5.6.1-1-src.tar.gz from the contrib/perl directory) fixes this problem. Without the patch, pp_system would use either do_aspawn() or do_spawn() instead of vfork(). Cheers, Brian On Fri, 22 Jun 2001, Brian Jepson wrote: > Hi, > > I'm running cygwin 1.3.2 on Windows 2000. I have one script that wants to > call another using system(). When I do this, the second script switches > into using Windows filenames. Here is the first script: > > #!/usr/bin/perl > system("/home/Administrator/foo.pl"); > > and the second script: > > #!/usr/bin/perl > print $0, "\n"; > > The output I get when I run /home/Administrator/foo.pl is: > > /home/Administrator/foo.pl > > However, when I run the first script, I get this: > > C:\cygwin\home\Administrator\foo.pl > > > Thanks, > > Brian > > > > ---559023410-851401618-993254718=:26353 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="pp_system_cygwin.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="pp_system_cygwin.patch" JCBkaWZmIC1jIHBlcmwtNS42LjEtMS1vcmlnL3BwX3N5cy5jIHBlcmwtNS42 LjEtMS9wcF9zeXMuYw0KKioqIHBlcmwtNS42LjEtMS1vcmlnL3BwX3N5cy5j CVN1biBEZWMgMTcgMjM6NDU6MDIgMjAwMA0KLS0tIHBlcmwtNS42LjEtMS9w cF9zeXMuYwlGcmkgSnVuIDIyIDE5OjU3OjAwIDIwMDENCioqKioqKioqKioq KioqKg0KKioqIDM3ODksMzc5NSAqKioqDQogIAl9DQogICAgICB9DQogICAg ICBQRVJMX0ZMVVNIQUxMX0ZPUl9DSElMRDsNCiEgI2lmIChkZWZpbmVkKEhB U19GT1JLKSB8fCBkZWZpbmVkKEFNSUdBT1MpKSAmJiAhZGVmaW5lZChWTVMp ICYmICFkZWZpbmVkKE9TMikgJiYgIWRlZmluZWQoX19DWUdXSU5fXykNCiAg ICAgIGlmIChQZXJsUHJvY19waXBlKHBwKSA+PSAwKQ0KICAJZGlkX3BpcGVz ID0gMTsNCiAgICAgIHdoaWxlICgoY2hpbGRwaWQgPSB2Zm9yaygpKSA9PSAt MSkgew0KLS0tIDM3ODksMzc5NSAtLS0tDQogIAl9DQogICAgICB9DQogICAg ICBQRVJMX0ZMVVNIQUxMX0ZPUl9DSElMRDsNCiEgI2lmIChkZWZpbmVkKEhB U19GT1JLKSB8fCBkZWZpbmVkKEFNSUdBT1MpKSAmJiAhZGVmaW5lZChWTVMp ICYmICFkZWZpbmVkKE9TMikgDQogICAgICBpZiAoUGVybFByb2NfcGlwZShw cCkgPj0gMCkNCiAgCWRpZF9waXBlcyA9IDE7DQogICAgICB3aGlsZSAoKGNo aWxkcGlkID0gdmZvcmsoKSkgPT0gLTEpIHsNCg== ---559023410-851401618-993254718=:26353 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ---559023410-851401618-993254718=:26353--