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?


>  From: "Robinow, David" <drobinow@dayton.adroit.com>
>  Date: Wed, 16 Aug 2000 12:00:35 -0400
>  
>  You don't have a cygwin version of perl in your path.

This has nothing to do with Perl.  The mangling of the command-line
arguments is being done by Cygwin before it calls Perl.

You may perhaps be correct that the mangling only happens when Cygwin
is calling a non-Cygwin application, but that's not relevant to me.  I
*need* to be able to call non-Cygwin applications from Cygwin, and it
worked before, so it should work now.

In fact, after further testing, it does indeed appear that the
incorrect quoting is only occurring when Cygwin calls a non-Cygwin
application.  For example, this command behaves correctly (it prints a
newline followed by " foo"):

	/usr/bin/printf '\n foo'

whereas this command does not (it prints "\\foo bar", which is
incorrect in the same way that the Perl example I previously sent is
incorrect):

	cmd /c 'echo \foo bar'

>  Try the same command
>  from a dos box. You won't get what you think you should there either.

Well, yes, actually, I will.  Using DOS quoting instead of bash
quoting:

	C:\>perl c:/tmp/foo.pl "\foo bar" "\foobar"
	\foo bar
	\foobar

	C:\>

That is the expected, correct output.

>   I don't have a cygwin perl handy.  Anybody know how that works?
>   Did you have a cygwin perl on your b20 system?

No.  The same version of Perl is being used in both cases.  With
Cygwin B20, it works; with Cygwin 1.1.0, it doesn't.

  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]