This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: cygwin1-20000811: exec*() quoting backslashes for args containing spaces?


You don't have a cygwin version of perl in your path. Try the same command
from a dos box. You won't get what you think you should there either.
 I don't have a cygwin perl handy.  Anybody know how that works?
 Did you have a cygwin perl on your b20 system?
-----Original Message-----
From: Jonathan Kamens [mailto:jik@kamens.brookline.ma.us]
Sent: Wednesday, August 16, 2000 11:29 AM
To: cygwin@sourceware.cygnus.com
Subject: cygwin1-20000811: exec*() quoting backslashes for args
containing spaces?

Put this in foo.pl:
	$" = "\n";
	print "@ARGV\n";

Now in a cygwin window run:
	perl foo.pl '\foo bar' '\foobar'

You SHOUlD see this:
	\foo bar
	\foobar

Instead, you'll see this:
	\\foo bar
	\foobar

The space appears to be the kicker -- when an argument has spaces in
it, the exec*() functions in cygwin1.dll quote the backslashes in it
before passing it to the called process.  This doesn't happen if there
are no spaces.  This seems rather broken.

The reason why I believe that cygwin1.dll is doing the bogus quoting
is because it happens whether you run the command from bash or ash.

I confirmed that this problem exists with two different cygwin1.dll's,
including the cygwin1-20000811 snapshot.  Here's the output of
"cygcheck -s -v -r" for that one:
[Omitted for brevity. See original post]

		      *************************

This is not a problem with Cygwin B20 when using a snapshot of
cygwin1.dll from 1999/9/30:

 4169k 2000/05/02 c:\cygnus\CYGWIN~1\H-I586~1\bin\cygwin1.dll - os=4.0
img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=1999/9/30 11:42

Any thoughts?

  jik

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]