Multiple backslashes
Randall R Schulz
rrschulz@cris.com
Sun Feb 10 10:58:00 GMT 2002
Dmitry,
If your XEmacs is a Windows app and not a Cygwin one, then my caveats apply
because it is another example of a Windows process initiating a Cygwin program.
From the Cygwin FAQ:
-==-
How does wildcarding (globbing) work?
If the DLL thinks it was invoked from a DOS style prompt, it runs a
`globber' over the arguments provided on the command line. This means that
if you type LS *.EXE from DOS, it will do what you might expect.
Beware: globbing uses malloc. If your application defines malloc, that will
get used. This may do horrible things to you.
-==-
From the Cygwin User Guide (".../cygwin-ug-net/using-cygwinenv.html"):
-==-
(no)glob[:ignorecase] - if set, command line arguments containing
UNIX-style file wildcard characters (brackets, question mark, asterisk,
escaped with \) are expanded into lists of files that match those
wildcards. This is applicable only to programs running from a DOS command
line prompt. Default is set.
-==-
So you see, you can tailor Cygwin's operations to your needs (as, of
course, you can alter XEmacs to your heart's content).
Regardless of whether you consider this behavior a bug, it's one of the
seams between the disparate environments (POSIX and Win32) that cannot be
completely eradicated. I don't think you're going to get the Cygwin
principals to agree that this is a bug. Obviously, it is a feature and
what's more, a feature that you can control.
Lastly, don't forget that you need not disable globbing globally. You can
always have XEmacs alter the CYGWIN environment locally so it applies only
to those sub-processes it initiates. Note that some CYGWIN environment
variable options apply globally and are only consulted when the cygwin1.dll
is loaded. I don't think this is one, but I'm not sure (and I hope you
won't think me lazy for not tracking down that detail!).
Case closed?
Randall Schulz
Mountain View, CA USA
At 10:33 2002-02-10, you wrote:
>Randall R Schulz <rrschulz@cris.com> writes:
>
> > What I said is accurate. However, in the absence of any explicit
> > mention on your part, I assumed you were issuing the commands you
> > specified from a Cygwin shell. It now appears you are entering them
> > into CMD.exe.
> >
> > If I'm not mistaken, arguments are processed differently in Cygwin
> > binaries when they are invoked from a Windows program than they are
> > when invoked by another Cygwin process. Someone who knows better (or
> > the manual...) will have to supply details, it's a mode of operation I
> > never encounter (CMD.exe offends me deeply...). I have a vague
> > recollection that there is a CYGWIN environment variable option that
> > controls or supresses or modifies this behavior somehow--I'm even less
> > sure about this than I am about the variant argument processing itself.
>
>OK, I will look into it.
>
> > I believe this is why you're experiencing difficulties. You'll have to
> > familiarize yourself with the special argument processing in the
> > Windows ->
> >
> > Cygwin transition.
> >
> > Or, you can do what I strongly suggest to everyone who'll listen:
> > DON'T USE CMD.EXE!
>
>Thank you very much for you comments, but I must repeat that in my case
>XEmacs calls bash -c "..." _directly_ via CreateProcess() with _exactly_
>the same results. So I still tend to consider the necessity of "\\\\" as a
>bug.
>
>Hope to hear from you soon,
>Dmitry
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list